3 Commits 0e9ae49dac ... 862463b5a2

Auteur SHA1 Message Date
  linqilong 862463b5a2 更新 il y a 1 semaine
  linqilong bcced33103 完成新增问题功能 il y a 1 semaine
  linqilong 41637e67c8 更新 il y a 1 semaine

+ 3 - 0
.env.development

@@ -8,3 +8,6 @@ NODE_ENV = 'development'
 
 # 开发环境
 VUE_APP_BASE_API = '/pdcApi'
+
+# IP地址
+VUE_APP_BASE_HOST = 'https://27.156.118.74:19901'

+ 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
-  //   }
-  // ])
-}

+ 49 - 9
src/api/questions.js

@@ -1,5 +1,5 @@
 import request from "@/utils/request";
-import { useUserStore } from "@/stores/user";
+import {useUserStore} from "@/stores/user";
 
 const userStore = useUserStore()
 
@@ -11,14 +11,15 @@ export function getTacQuestionList() {
     return request({
         url: '/tac/pblm/info/pageNew',
         method: 'POST',
-        data: {"count":"false",
-            "orderBy":"INTM",
-            "pageNum":1,
-            "pageSize":200,
-            "pblmQlttvCd":0,
-            "persId":userid,
-            "sn":0,
-            "year":0
+        data: {
+            "count": "false",
+            "orderBy": "INTM",
+            "pageNum": 1,
+            "pageSize": 200,
+            "pblmQlttvCd": 0,
+            "persId": userid,
+            "sn": 0,
+            "year": 0
         }
     })
 }
@@ -36,3 +37,42 @@ export function getIllegalActList(data) {
         data: data
     })
 }
+
+/**
+ * 违法事项详情
+ */
+export function getIllegalActById(id) {
+    return request({
+        url: `/tac/obj/pblmstb/${id}`,
+        method: 'get',
+    })
+}
+
+/**
+ * 稽查 - 稽查单位
+ */
+export function getTacUnitList(rgstrId, sysType) {
+    return request({
+        url: '/tac/pawp/unit/sctn/list',
+        method: 'POST',
+        data: {"pageNum": 1, "pageSize": 1000, "rgstrId": rgstrId, "sysType": sysType}
+    })
+}
+
+/**
+ * 稽查 - 新增问题
+ */
+export function addTacQuestion(data) {
+    return request({
+        url: '/tac/pblm/info',
+        method: 'POST',
+        data: data
+    })
+}
+
+export function deleteTacQuestion(pblmId) {
+    return request({
+        url: `/tac/pblm/info/del/${pblmId}`,
+        method: 'get',
+    })
+}

+ 38 - 34
src/components/GwSelect02.vue

@@ -1,58 +1,62 @@
 <template>
-    <div class="filter-item">
-            <van-field   v-model="name"    is-link  readonly  :label="props.label"    :placeholder="`选择${props.label}`"      @click="showPicker = true"  />
-        <van-popup v-model:show="showPicker" round position="bottom">
-            <van-picker :columns="props.columns" @cancel="showPicker = false" @confirm="onConfirm" />
-        </van-popup>
-    </div>
+  <div class="filter-item">
+    <van-field v-model="name" :label="props.label" :placeholder="`选择${props.label}`" is-link readonly
+               @click="showPicker = true"/>
+    <van-popup v-model:show="showPicker" position="bottom" round>
+      <van-picker :columns="props.columns" @cancel="showPicker = false" @confirm="onConfirm"/>
+    </van-popup>
+  </div>
 </template>
 <script setup>
-import { ref, defineProps, defineEmits, watch } from "vue";
+import {defineEmits, defineProps, ref, watch} from "vue";
 
 const emits = defineEmits(['update:value']);
 
 const props = defineProps({
-    label: {
-        type: String,
-        default: '',
-    },
-    columns: {
-        type: Array,
-        default: () => [],
-    },
-    value: {
-        type: null,
-    }
+  label: {
+    type: String,
+    default: '',
+  },
+  columns: {
+    type: Array,
+    default: () => [],
+  },
+  value: {
+    type: null,
+  }
 })
 
-const name = ref('')
+const name = ref('');
 const showPicker = ref(false);
-const onConfirm = ({ selectedOptions }) => {
-    showPicker.value = false;
-    emits('update:value', selectedOptions[0].value);
+const onConfirm = ({selectedOptions}) => {
+  showPicker.value = false;
+  emits('update:value', selectedOptions[0].value);
 };
 
 function getTypeName(code) {
-    if (!code) return '';
-    return props.columns.find(item => item.value === code)?.text;
+  if (!code) return '';
+  if (props.columns && props.columns.length > 0) {
+    return props.columns.find(item => item.value === code)?.text || code;
+  }
+  return code;
 }
 
 watch(() => props.value, (newValue) => {
-    name.value = getTypeName(newValue);
-}, { immediate: true })
+  name.value = getTypeName(newValue);
+}, {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;
 
-    .ducha-group-wrapper {
-        height: calc(100% - 35px);
-        overflow: auto;
-    }
+  .ducha-group-wrapper {
+    height: calc(100% - 35px);
+    overflow: auto;
+  }
 
 }
-</style>
+</style>

+ 60 - 47
src/components/card01.vue

@@ -1,67 +1,80 @@
 <template>
-    <div class="card-01-wrapper">
+  <div class="card-01-wrapper">
+    <van-row>
+      <van-col :span="$slots.right ? 20 : 24" @click="emits('select')">
         <div class="card-01-header">
-            <van-icon v-if="props.icon && isString(props.icon)" style="margin-right: 5px;" :name="props.icon" color="#1989fa" size="1.3rem" />
-            <van-tag  v-else-if="props.icon && props.icon.type === 'tag'"  style="margin-right: 5px;height: 1rem;white-space: nowrap;" :color="props.icon.color" text-color="#fff">{{ props.icon.value }}</van-tag>
-            <span>{{ props.title }}</span>
+          <van-icon v-if="props.icon && isString(props.icon)" :name="props.icon" color="#1989fa"
+                    size="1.3rem" style="margin-right: 5px;"/>
+          <van-tag v-else-if="props.icon && props.icon.type === 'tag'"
+                   :color="props.icon.color" style="margin-right: 5px;height: 1rem;white-space: nowrap;"
+                   text-color="#fff">{{ props.icon.value }}
+          </van-tag>
+          <span>{{ props.title }}</span>
         </div>
         <div v-if="props.description" class="card-01-description">
-            <van-text-ellipsis v-if="props.ellipsisDescription" :content="props.description" />
-            <span v-else v-html="props.description"></span>
+          <van-text-ellipsis v-if="props.ellipsisDescription" :content="props.description"/>
+          <span v-else v-html="props.description"></span>
         </div>
-    </div>
+      </van-col>
+      <van-col v-if="$slots.right" span="4" style="display: flex;justify-content: center;align-items: center;">
+        <slot name="right"></slot>
+      </van-col>
+    </van-row>
+  </div>
 </template>
 <script setup>
-import { defineProps } from 'vue';
-import { isString } from '@/utils/validate';
+import {defineEmits, defineProps} from 'vue';
+import {isString} from '@/utils/validate';
+
+const emits = defineEmits(['select']);
 
 const props = defineProps({
-    icon: {
-        default: ''
-    },
-    title: {
-        type: String,
-        default: ''
-    },
-    description: {
-        type: String,
-        default: ''
-    },
-    ellipsisDescription: {
-        type: Boolean,
-        default: false
-    }
+  icon: {
+    default: ''
+  },
+  title: {
+    type: String,
+    default: ''
+  },
+  description: {
+    type: String,
+    default: ''
+  },
+  ellipsisDescription: {
+    type: Boolean,
+    default: false
+  }
 })
 
 </script>
 <style lang="scss" scoped>
 .card-01-wrapper {
-    background-color: #fff;
-    border-radius: 10px;
-    padding: 10px;
-    margin: 10px;
-
-    .card-01-header {
-        display: flex;
-        flex-direction: row;
-        align-items: center;
+  background-color: #fff;
+  border-radius: 10px;
+  padding: 10px;
+  margin: 10px;
 
-        span {
-            font-size: 1rem;
-            color: #303133;
-            font-weight: bold;
-        }
+  .card-01-header {
+    display: flex;
+    flex-direction: row;
+    align-items: center;
 
+    span {
+      font-size: 1rem;
+      color: #303133;
+      font-weight: bold;
     }
 
-    .card-01-description {
-        font-size: 0.9rem;
-        color:#A8ABB2;
-        margin-top: 10px;
-    }
+  }
 
-    &:last-child {
-        margin-bottom: 20px;
-    }
+  .card-01-description {
+    font-size: 0.9rem;
+    color: #A8ABB2;
+    margin-top: 10px;
+  }
+
+  &:last-child {
+    margin-bottom: 20px;
+  }
 }
-</style>
+</style>

+ 0 - 55
src/components/list01.vue

@@ -1,55 +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 { ref, defineProps, watch, defineEmits } 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;
-            debugger
-            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>

+ 17 - 7
src/layout/index.vue

@@ -1,20 +1,26 @@
 <template>
   <div :style="{ '--current-color': theme }" class="app-wrapper">
-    <van-nav-bar :title="route.meta.title || '福建水利监管工作平台'" />
+    <van-nav-bar :left-arrow="showBackButton" :title="route.meta.title || '福建水利监管工作平台'" @click-left="back"/>
     <!-- 展示页 -->
-    <app-main />
+    <app-main/>
     <!-- 底部 -->
-    <bottom-nav />
+    <bottom-nav/>
   </div>
 </template>
 <script setup>
-import { ref } from 'vue';
-import { AppMain, BottomNav } from '@/layout/components/index.js'
-import { useRoute } from "vue-router";
+import {computed, ref} from 'vue';
+import {AppMain, BottomNav} from '@/layout/components/index.js'
+import {useRoute, useRouter} from "vue-router";
+
+const router = useRouter()
 const route = useRoute()
 
 const theme = ref(localStorage.getItem('theme'))
+const showBackButton = computed(() => route.meta.showBack)
 
+function back() {
+  router.go(-1)
+}
 </script>
 <style lang="scss" scoped>
 .app-wrapper {
@@ -37,4 +43,8 @@ const theme = ref(localStorage.getItem('theme'))
 .app-wrapper .van-nav-bar__content {
   background-color: #007BFF;
 }
-</style>
+
+.app-wrapper .van-nav-bar .van-icon {
+  color: #fff;
+}
+</style>

+ 20 - 10
src/router/index.js

@@ -1,5 +1,5 @@
 // import {createRouter, createWebHistory} from '@ionic/vue-router';
-import { createRouter, createWebHistory } from 'vue-router';
+import {createRouter, createWebHistory} from 'vue-router';
 import layout from '@/layout/index.vue'
 
 const routes = [
@@ -28,31 +28,41 @@ const routes = [
                 name: 'inspect',
                 component: () => import('@/views/Inspect/index.vue'),
             },
+            {
+                path: 'problem',
+                name: 'problem',
+                component: () => import('@/views/Problem/index.vue'),
+                meta: {title: '问题列表'}
+            },
+            {
+                path: 'about',
+                name: 'about',
+                component: () => import('@/views/AboutView.vue'),
+                meta: {title: '我的'}
+            },
             {
                 path: 'inspect/:id/objects',
                 name: 'inspectObjects',
                 component: () => import('@/views/Inspect/Object/index.vue'),
+                meta: {title: '工程列表', showBack: true}
             },
             {
                 path: 'inspect/:id/object/:objId/problems',
                 name: 'inspectObjectQuestions',
                 component: () => import('@/views/Inspect/Object/Problem/index.vue'),
-            },
-            {
-                path: 'problem',
-                name: 'problem',
-                component: () => import('@/views/Problem/index.vue'),
+                meta: {title: '问题列表', showBack: true}
             },
             {
                 path: 'problem/:id',
                 name: 'problemDetail',
                 component: () => import('@/views/Problem/detail/index.vue'),
+                meta: {title: '问题详情', showBack: true}
             },
             {
-                path: 'about',
-                name: 'about',
-                component: () => import('@/views/AboutView.vue'),
-                meta: { title: '我的' }
+                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')
+            }
+        }
     }
-  }
-}
+}

+ 317 - 0
src/utils/ruoyi.js

@@ -0,0 +1,317 @@
+/**
+ * 通用js方法封装处理
+ * Copyright (c) 2019 ruoyi
+ */
+
+// 日期格式化
+export function parseTime(time, pattern) {
+  if (arguments.length === 0 || !time) {
+    return null;
+  }
+  const format = pattern || "{y}-{m}-{d} {h}:{i}:{s}";
+  let date;
+  if (typeof time === "object") {
+    date = time;
+  } else {
+    if (typeof time === "string" && /^[0-9]+$/.test(time)) {
+      time = parseInt(time);
+    } else if (typeof time === "string") {
+      time = time
+          .replace(new RegExp(/-/gm), "/")
+          .replace("T", " ")
+          .replace(new RegExp(/\.[\d]{3}/gm), "");
+    }
+    if (typeof time === "number" && time.toString().length === 10) {
+      time = time * 1000;
+    }
+    date = new Date(time);
+  }
+  const formatObj = {
+    y: date.getFullYear(),
+    m: date.getMonth() + 1,
+    d: date.getDate(),
+    h: date.getHours(),
+    i: date.getMinutes(),
+    s: date.getSeconds(),
+    a: date.getDay(),
+  };
+  const time_str = format.replace(/{(y|m|d|h|i|s|a)+}/g, (result, key) => {
+    let value = formatObj[key];
+    // Note: getDay() returns 0 on Sunday
+    if (key === "a") {
+      return ["日", "一", "二", "三", "四", "五", "六"][value];
+    }
+    if (result.length > 0 && value < 10) {
+      value = "0" + value;
+    }
+    return value || 0;
+  });
+  return time_str;
+}
+
+// 新建日期范围
+export function addDateRange(params, dateRange, propName) {
+  let search = params;
+  search.params =
+      typeof search.params === "object" &&
+      search.params !== null &&
+      !Array.isArray(search.params)
+          ? search.params
+          : {};
+  dateRange = Array.isArray(dateRange) ? dateRange : [];
+  if (typeof propName === "undefined") {
+    search.params["beginTime"] = dateRange[0];
+    search.params["endTime"] = dateRange[1];
+  } else {
+    search.params["begin" + propName] = dateRange[0];
+    search.params["end" + propName] = dateRange[1];
+  }
+  return search;
+}
+
+// 回显数据字典
+export function selectDictLabel(datas, value) {
+  var actions = [];
+  Object.keys(datas).some((key) => {
+    if (datas[key].value == "" + value) {
+      actions.push(datas[key].label);
+      return true;
+    }
+  });
+  return actions.join("");
+}
+
+// 回显数据字典(字符串数组)
+export function selectDictLabels(datas, value, separator) {
+  var actions = [];
+  var currentSeparator = undefined === separator ? "," : separator;
+  var temp = value.split(currentSeparator);
+  Object.keys(value.split(currentSeparator)).some((val) => {
+    Object.keys(datas).some((key) => {
+      if (datas[key].value == "" + temp[val]) {
+        actions.push(datas[key].label + currentSeparator);
+      }
+    });
+  });
+  return actions.join("").substring(0, actions.join("").length - 1);
+}
+
+// 字符串格式化(%s )
+export function sprintf(str) {
+  var args = arguments,
+      flag = true,
+      i = 1;
+  str = str.replace(/%s/g, function () {
+    var arg = args[i++];
+    if (typeof arg === "undefined") {
+      flag = false;
+      return "";
+    }
+    return arg;
+  });
+  return flag ? str : "";
+}
+
+// 转换字符串,undefined,null等转化为""
+export function praseStrEmpty(str) {
+  if (!str || str == "undefined" || str == "null") {
+    return "";
+  }
+  return str;
+}
+
+// 数据合并
+export function mergeRecursive(source, target) {
+  for (var p in target) {
+    try {
+      if (target[p].constructor == Object) {
+        source[p] = mergeRecursive(source[p], target[p]);
+      } else {
+        source[p] = target[p];
+      }
+    } catch (e) {
+      source[p] = target[p];
+    }
+  }
+  return source;
+}
+
+/**
+ * 构造树型结构数据
+ * @param {*} data 数据源
+ * @param {*} id id字段 默认 'id'
+ * @param {*} parentId 父节点字段 默认 'parentId'
+ * @param {*} children 孩子节点字段 默认 'children'
+ */
+export function handleTree(data, id, parentId, children) {
+  let config = {
+    id: id || "id",
+    parentId: parentId || "parentId",
+    childrenList: children || "children",
+  };
+
+  var childrenListMap = {};
+  var nodeIds = {};
+  var tree = [];
+
+  for (let d of data) {
+    let parentId = d[config.parentId];
+    if (childrenListMap[parentId] == null) {
+      childrenListMap[parentId] = [];
+    }
+    nodeIds[d[config.id]] = d;
+    childrenListMap[parentId].push(d);
+  }
+
+  for (let d of data) {
+    let parentId = d[config.parentId];
+    if (nodeIds[parentId] == null) {
+      tree.push(d);
+    }
+  }
+
+  for (let t of tree) {
+    adaptToChildrenList(t);
+  }
+
+  function adaptToChildrenList(o) {
+    if (childrenListMap[o[config.id]] !== null) {
+      o[config.childrenList] = childrenListMap[o[config.id]];
+    }
+    if (o[config.childrenList]) {
+      for (let c of o[config.childrenList]) {
+        adaptToChildrenList(c);
+      }
+    }
+  }
+
+  return tree;
+}
+
+export function treeToList(treeList) {
+  let list = [];
+
+  function traverse(node) {
+    if (node) {
+      list.push(node); // 将节点的值新建到列表中
+      if (node.children) {
+        for (let child of node.children) {
+          traverse(child); // 递归遍历子节点
+        }
+      }
+    }
+  }
+
+  treeList.forEach((tree) => traverse(tree))
+  return list;
+}
+
+
+export function handleTree2(list, parentId, id, value) {
+  if (!list || list.length === 0) {
+    return list;
+  }
+
+  let config = {
+    value: value || "0",
+    parentId: parentId || "pid",
+    id: id || "id",
+    children: "children",
+  };
+
+  return createTree(list, config.value, config.parentId, config.id);
+}
+
+export function createTree(list, value, parentId, id) {
+  let tree = [];
+  for (let num = 0; num < list.length; num++) {
+    let data = list[num];
+    if (data[parentId] === value) {
+      let children = createTree(list, data[id], parentId, id);
+      if (children && children.length > 0) {
+        data["children"] = children;
+      }
+      tree.push(data);
+    }
+  }
+  return tree;
+}
+
+export function copyObj(obj) {
+  let newObjStr = JSON.stringify(obj);
+  return JSON.parse(newObjStr);
+}
+
+/**
+ * * 生成一个不重复的ID
+ * @param { Number } randomLength
+ */
+export const getUUID = (randomLength = 10) => {
+  return Number(
+      Math.random().toString().substr(2, randomLength) + Date.now()
+  ).toString(36);
+};
+
+export function dateFYMDHM(val) {
+  if (val) {
+    return (
+        val.substr(0, 4) +
+        "-" +
+        val.substr(4, 2) +
+        "-" +
+        val.substr(6, 2) +
+        " " +
+        val.substr(8, 2) +
+        ":" +
+        val.substr(10, 2)
+    );
+  }
+  return "";
+}
+
+/**
+ * 列表筛重
+ * @param list  列表
+ * @param key   筛选字段
+ * @returns {Set<any>[]|*|*[]}
+ */
+export function listFilterDuplicateData(list, key) {
+  if (!list || list.length === 0) {
+    return list
+  }
+  if (!key) {
+    return Array.from(new Set(list))
+  }
+
+  const fdd = new Set(list.map(i => i[key]))
+
+  let retList = []
+  list.forEach(i => {
+    let param = i[key];
+    if (fdd.has(param)) {
+      retList.push(i);
+      fdd.delete(param)
+    }
+  })
+
+  return retList
+}
+
+export function getObjectSize(obj) {
+  let count = 0
+  for (let key in obj)
+    count++
+  return count
+}
+
+// a 数组是否包含 b 数组的值
+export function isHasByOtherArray(a = [], b = []) {
+  for (let i in a) {
+    for (let j in b) {
+      if (a[i] == b[j]) {
+        return true
+      }
+    }
+  }
+  return false
+}

+ 8 - 2
src/views/HomeView.vue

@@ -1,11 +1,17 @@
 <template>
-<iframe class="home-wrapper" src="https://27.156.118.74:19901/statistics/index.html?type=1" ></iframe>
+  <iframe :src="`https://27.156.118.74:19901/statistics/index.html?type=${appStore.ownApp}`"
+          class="home-wrapper"></iframe>
 </template>
+<script setup>
+import {useAppStore} from "@/stores/app";
+
+const appStore = useAppStore();
+</script>
 <style lang="scss" scoped>
 .home-wrapper {
   width: 100%;
   height: 100%;
-  border: none; 
+  border: none;
 }
 
 .container {

+ 64 - 23
src/views/Inspect/Object/Problem/index.vue

@@ -1,40 +1,70 @@
 <template>
   <div style="height: 100%;padding: 10px 0;">
-    <card01 style="margin-top: 0;" :title="object.ojbNm + ''" icon="label" :description="renderData(object, objectConfig.description2)" />
-    <van-collapse class="pblm-list-wrapper" v-model="activeNames">
+    <card01 :description="renderData(object, objectConfig.description2)" :title="object.ojbNm + ''" icon="label"
+            style="margin-top: 0;"/>
+    <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>
+          <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(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>
-import { onMounted, ref } from "vue";
-import { useRoute } from "vue-router";
+import {onMounted, ref} from "vue";
+import {useRoute} from "vue-router";
 import card01 from '@/components/card01.vue';
-import { getTacQuestionList } from "@/api/inspect";
-import { getBaseByInspectType } from "@/assets/js/base";
-import { renderData } from "@/utils/template";
-import { jumpPage } from "@/utils/page";
+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']);
 const list = ref([
-  { id: '1', name: '前期与设计专业', pblmList:[] },
-  { id: '2', name: '建设管理专业', pblmList:[] },
-  { id: '3', name: '计划下达与执行专业', pblmList:[] },
-  { id: '4', name: '资金使用与管理专业', pblmList:[] },
-  { id: '5', name: '工程质量专业', pblmList:[] },
-  { id: '6', name: '工程安全专业', pblmList:[] }
+  {id: '1', name: '前期与设计专业', pblmList: []},
+  {id: '2', name: '建设管理专业', pblmList: []},
+  {id: '3', name: '计划下达与执行专业', pblmList: []},
+  {id: '4', name: '资金使用与管理专业', pblmList: []},
+  {id: '5', name: '工程质量专业', pblmList: []},
+  {id: '6', name: '工程安全专业', pblmList: []}
 ]);
 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 => {
@@ -45,23 +75,34 @@ function getData() {
   })
 }
 
+/**
+ * 删除问题
+ */
+function deletePblm(pblmId) {
+  deleteTacQuestion(pblmId).then(() => {
+    getData();
+  })
+}
+
 onMounted(() => {
   getData();
 })
 </script>
-<style lang="scss" scoped>
-
-</style>
 <style lang="scss">
-.pblm-list-wrapper{
+.pblm-list-wrapper {
   padding: 0 10px;
   height: calc(100% - 120px);
   overflow: auto;
-  
-  .van-collapse-item__content{
+
+  .van-collapse-item__content {
     padding: 0;
     background-color: transparent;
   }
 }
 
-</style>
+.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>

+ 83 - 0
src/views/Problem/detail/TacObjPblmstbList.vue

@@ -0,0 +1,83 @@
+<template>
+  <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>
+import {defineEmits, defineProps, ref} from 'vue';
+import card01 from '@/components/card01.vue';
+import {getIllegalActList} from '@/api/questions';
+
+const emits = defineEmits(['change']);
+
+const props = defineProps({
+  listType: {
+    type: String,
+    default: '1',
+  },
+})
+
+const list = ref([]);
+const name = ref("");
+const pageNum = ref(0);
+const total = ref(0);
+const loading = ref(false);
+const finished = ref(false);
+
+const onSearch = () => {
+  pageNum.value = 0;
+  total.value = 0;
+  finished.value = false;
+  list.value = [];
+  onLoad()
+}
+
+const onLoad = () => {
+  loading.value = true;
+  pageNum.value++;
+  const params = {
+    "class1Name": name.value,
+    "pageNum": pageNum.value,
+    "pageSize": 20,
+    "pblmType": props.listType,
+    "realPageNum": 0
+  }
+
+  getIllegalActList(params).then(res => {
+    list.value = [...list.value, ...res.data.list];
+    total.value = res.data.total;
+
+    // 加载状态结束
+    loading.value = false;
+
+    // 数据全部加载完成
+    if (total.value !== 0 && list.value.length >= total.value) {
+      finished.value = true;
+    }
+  })
+};
+
+function handleClick(item) {
+  emits('change', item);
+}
+</script>
+<style lang="scss" scoped>
+.tac-obj-pblmstb-list-wrapper {
+  height: calc(100% - 59px);
+  background-color: #ebecf0;
+  padding-top: 10px;
+  overflow: auto;
+
+  .card-01-wrapper:first-child {
+    margin-top: 0;
+  }
+
+}
+</style>

+ 281 - 103
src/views/Problem/detail/index.vue

@@ -1,137 +1,315 @@
 <template>
-    <div class="pblm-detail-wrapper">
-        <van-form @submit="onSubmit">
-            <card01 style="margin-top: 0;" :title="pblm.name + ''" icon="label"
-                :description="`工程地址:${pblm.location}<br/>问题类型:${listTypeConvert(pblm.listType)}`" />
-            <div class="pblm-detail-label">
-                <span>违规事项</span>
-                <van-button size="mini" type="primary" @click="changeTacObjPblmstb()">选择违规事项</van-button>
-            </div>
-            <van-cell-group inset>
-                <van-field v-model="tacObjPblmstb.pblmTypeDesc" label="问题类型" placeholder="问题类型" label-align="top"
-                    rows="1" autosize type="textarea" readonly />
-                <van-field v-model="tacObjPblmstb.pblmsDesc" label="违规事项" placeholder="违规事项" label-align="top" rows="2"
-                    autosize type="textarea" readonly />
-                <van-field v-model="tacObjPblmstb.relativeLaw" label="法规条款" placeholder="法规条款" label-align="top"
-                    rows="2" autosize type="textarea" readonly />
-                <van-field v-model="tacObjPblmstb.lawContent" label="法规内容" placeholder="法规内容" label-align="top" rows="2"
-                    autosize type="textarea" readonly />
-                <van-field v-model="pblm.note" label="备注" placeholder="备注" label-align="top" rows="2" autosize
-                    type="textarea" />
-            </van-cell-group>
-            <div class="pblm-detail-label">问题描述</div>
-            <van-cell-group inset>
-                <van-field v-model="pblm.pblmNm" label="发现问题" placeholder="发现问题" label-align="top" rows="2" autosize
-                    type="textarea" />
-                <van-field v-model="pblm.pblmDesc" label="问题阐述" placeholder="问题阐述" label-align="top" rows="2" autosize
-                    type="textarea" />
-                <van-field v-model="pblm.pblmReason" label="主要原因分析" placeholder="主要原因分析" label-align="top" rows="2"
-                    autosize type="textarea" />
-                <van-field v-model="pblm.pblmSggtn" label="整改意见及建议" placeholder="整改意见及建议" label-align="top" rows="2"
-                    autosize type="textarea" />
-                <van-field v-model="pblm.spclRvwOptn" label="稽查组长复核意见" placeholder="稽查组长复核意见" label-align="top" rows="2"
-                    autosize type="textarea" />
-                <GwSelect02 label="问题严重性" :columns="cateObjList" v-model:value="pblm.pblmPasi"></GwSelect02>
-                <van-field name="radio" label="是否典型问题">
-                    <template #input>
-                        <van-radio-group v-model="pblm.ifCasePblm" direction="horizontal">
-                            <van-radio name="1">是</van-radio>
-                            <van-radio name="0">否</van-radio>
-                        </van-radio-group>
-                    </template>
-                </van-field>
-                <van-field name="stepper" label="排序序号">
-                    <template #input>
-                        <van-stepper v-model="pblm.sn" />
-                    </template>
-                </van-field>
-                <van-field name="uploader" label="文件上传">
-                    <template #input>
-                        <van-uploader v-model="gwComFileList" />
-                    </template>
-                </van-field>
-            </van-cell-group>
-            <div class="pblm-detail-label">责任主体</div>
-            <van-cell-group inset>
-                <div class="pblmSubjectList" v-for="item in pblm.pblmSubjectList" :key="item.id">
-                    <GwSelect02 label="单位性质" :columns="objSubjectColumns" v-model:value="item.subId"></GwSelect02>
-                    <van-field v-model="item.unitNm" label="单位名称" placeholder="单位名称" />
-                </div>
-                <van-button round plain hairline block>
-                    <van-icon style="margin-right: 5px;" name="plus" color="#000" size="1rem" />
-                    添加单位
-                </van-button>
-            </van-cell-group>
-            <div style="margin: 16px;">
-                <van-button round block type="primary" native-type="submit">
-                    提交
-                </van-button>
-            </div>
-        </van-form>
-
-        <van-popup v-model:show="tacObjPblmstbShow" position="left" :style="{ width: '80%', height: '100%' }">
-
-        </van-popup>
-    </div>
+  <div class="pblm-detail-wrapper">
+    <van-form @submit="onSubmit">
+      <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">
+        <span>违规事项</span>
+        <van-button size="mini" type="primary" @click="showTacObjPblmstbPopup()">选择违规事项</van-button>
+      </div>
+      <van-cell-group inset>
+        <van-field v-model="tacObjPblmstb.pblmTypeDesc" autosize label="问题类型" label-align="top"
+                   placeholder="问题类型" readonly rows="1" type="textarea"/>
+        <van-field v-model="tacObjPblmstb.pblmsDesc" autosize label="违规事项" label-align="top" placeholder="违规事项"
+                   readonly rows="2" type="textarea"/>
+        <van-field v-model="tacObjPblmstb.relativeLaw" autosize label="法规条款" label-align="top"
+                   placeholder="法规条款" readonly rows="2" type="textarea"/>
+        <van-field v-model="tacObjPblmstb.lawContent" autosize label="法规内容" label-align="top" placeholder="法规内容"
+                   readonly rows="2" type="textarea"/>
+        <van-field v-model="pblm.note" autosize label="备注" label-align="top" placeholder="备注" rows="2"
+                   type="textarea"/>
+      </van-cell-group>
+      <div class="pblm-detail-label">问题描述</div>
+      <van-cell-group inset>
+        <van-field v-model="pblm.pblmNm" autosize label="发现问题" label-align="top" placeholder="发现问题" rows="2"
+                   type="textarea"/>
+        <van-field v-model="pblm.pblmDesc" autosize label="问题阐述" label-align="top" placeholder="问题阐述" rows="2"
+                   type="textarea"/>
+        <van-field v-model="pblm.pblmReason" autosize label="主要原因分析" label-align="top" placeholder="主要原因分析"
+                   rows="2" type="textarea"/>
+        <van-field v-model="pblm.pblmSggtn" autosize label="整改意见及建议" label-align="top"
+                   placeholder="整改意见及建议"
+                   rows="2" type="textarea"/>
+        <van-field v-model="pblm.spclRvwOptn" autosize label="稽查组长复核意见" label-align="top"
+                   placeholder="稽查组长复核意见"
+                   rows="2" type="textarea"/>
+        <GwSelect02 v-model:value="pblm.pblmPasi" :columns="cateObjList" label="问题严重性"></GwSelect02>
+        <van-field label="是否典型问题" name="radio">
+          <template #input>
+            <van-radio-group v-model="pblm.ifCasePblm" direction="horizontal">
+              <van-radio name="1">是</van-radio>
+              <van-radio name="0">否</van-radio>
+            </van-radio-group>
+          </template>
+        </van-field>
+        <van-field label="排序序号" name="stepper">
+          <template #input>
+            <van-stepper v-model="pblm.sn"/>
+          </template>
+        </van-field>
+        <van-field label="文件上传" label-align="top" name="uploader">
+          <template #input>
+            <van-uploader v-model="gwComFileList"/>
+          </template>
+        </van-field>
+      </van-cell-group>
+      <div class="pblm-detail-label">责任主体</div>
+      <van-cell-group inset>
+        <div v-for="(item, index) in subjectList" :key="item.id" class="pblmSubjectList">
+
+          <van-row style="border-bottom: 1px dashed #CDD0D6;">
+            <van-col span="20">
+              <GwSelect02 v-model:value="item.subId" :columns="objSubjectTypeColumns" label="单位性质"></GwSelect02>
+              <GwSelect02 v-model:value="item.unitNm" :columns="getObjSubjectColumns(index)"
+                          label="单位名称">
+              </GwSelect02>
+            </van-col>
+            <van-col span="4" style="display: flex;justify-content: center;align-items: center;"
+                     @click="removePblmSubject(index)">
+              <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;"/>
+          添加单位
+        </van-button>
+      </van-cell-group>
+      <div style="margin: 16px;">
+        <van-button block native-type="submit" round type="primary">
+          提交
+        </van-button>
+      </div>
+    </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>
+    </van-popup>
+  </div>
 </template>
 <script setup>
-import { onMounted, ref, computed, watch } from "vue";
-import { useRoute } from "vue-router";
+import {computed, onMounted, ref, watch} from "vue";
+import {useRoute} from "vue-router";
+import {showNotify} from 'vant';
 import card01 from '@/components/card01.vue';
 import GwSelect02 from '@/components/GwSelect02.vue';
-import { getTacQuestionById } from "@/api/inspect";
-import { listTypeConvert } from "@/utils/convert"
+import tacObjPblmstbList from './TacObjPblmstbList.vue';
+import {listTypeConvert} from "@/utils/convert";
+import {getTacQuestionById} from "@/api/inspect";
+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 objSubjectColumns = computed(() => objSubjectList.value?.map(i => { return { text: i.subName, value: i.id } }) || []);
-const gwComFileList = computed(() => pblm.value.gwComFileList?.map(i => process.env.VUE_APP_BASE_API + i.filePath) || []);
-
+const cateObjList = ref([]);
+const objSubjectList = ref([]);
+const objSubjectTypeColumns = computed(() => objSubjectList.value?.map(i => {
+  return {text: i.subName, value: i.id}
+}) || []);
+const objSubjects = ref({});
+const gwComFileList = computed(() => pblm.value.gwComFileList?.map(i => {
+  return {url: process.env.VUE_APP_BASE_HOST + process.env.VUE_APP_BASE_API + i.filePath}
+}) || []);
+/**
+ * 责任主体
+ */
+const subjectList = ref([]);
 const tacObjPblmstbShow = ref(false);
 
 function getQuestionData() {
-    getTacQuestionById(route.params.id).then(res => {
-        pblm.value = res.data
-    })
+  getTacQuestionById(route.params.id).then(res => {
+    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
+    }
+  })
 }
 
 /**
  * 选择违规事项
  */
-function changeTacObjPblmstb() {
-    console.log('changeTacObjPblmstb')
+function showTacObjPblmstbPopup() {
+  tacObjPblmstbShow.value = true;
+}
+
+function changeTacObjPblmstb(data) {
+  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 [];
+  }
+}
+
+/**
+ * 保存问题
+ */
 function onSubmit() {
-    console.log(e)
+  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
+  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: '保存成功'});
+  })
+}
+
+async function getObjSubjects(rgstrId, subId) {
+  if (rgstrId && subId) {
+    return await getTacUnitList(rgstrId, subId).then(res => res.data) || []
+  } else {
+    return []
+  }
+}
+
+function getObjSubjectColumns(index) {
+  return (objSubjects.value[index] || []).map(i => {
+    return {text: i.sysNm, value: i.sysNm}
+  })
+}
+
+/**
+ * 添加责任主体
+ */
+function addPblmSubject() {
+  subjectList.value.push({});
+}
+
+function removePblmSubject(index) {
+  subjectList.value.splice(index, 1);
 }
 
 onMounted(() => {
-    getQuestionData();
+  getQuestionData();
 })
+
+watch(() => subjectList, (list) => {
+  if (list.value && list.value.length > 0) {
+    list.value.forEach((item, index) => {
+      if (item.subId) {
+        getObjSubjects(pblm.value.rgstrId, item.subId).then(res => {
+          objSubjects.value[index] = res;
+        })
+      }
+    })
+  }
+}, {deep: true, immediate: true})
 </script>
 <style lang="scss" scoped>
 .pblm-detail-wrapper {
-    height: 100%;
-    padding: 10px 0;
-    overflow: auto;
-
-    .pblm-detail-label {
-        padding: 10px 16px;
-        color: #606266;
-        display: flex;
-        align-items: center;
-        justify-content: space-between;
-    }
+  height: 100%;
+  padding: 10px 0;
+  overflow: auto;
+
+  .pblm-detail-label {
+    padding: 10px 16px;
+    color: #606266;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+  }
 
 }
 </style>
 <style lang="scss">
 .van-cell-group--inset {
-    margin: 0 10px;
+  margin: 0 10px;
 }
-</style>
+</style>

+ 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>