Hua 1 settimana fa
parent
commit
e3988748eb

+ 3 - 1
.env.development

@@ -10,4 +10,6 @@ NODE_ENV = 'development'
 VUE_APP_BASE_API = '/pdcApi'
 
 # IP地址
-VUE_APP_BASE_HOST = 'https://27.156.118.74:19901'
+# VUE_APP_BASE_HOST = 'http://39.98.38.2:18089/dc-api/'
+
+VUE_APP_BASE_HOST = 'https://27.156.118.74:19901'

+ 8 - 1
src/api/inspect.js

@@ -43,7 +43,14 @@ export function getObjectList(groupId) {
         data: { "limit": -1, "pageNum": 1, "pageSize": 200, "groupId": groupId, "inspType": "", "mainType": false, "ojbNm": "", "persId": userid, "prjType": "", "type": "" }
     })
 }
-
+export function getObjectListDu(groupId) {
+    const userid = userStore.userId
+    return request({
+        url: '/bis/insp/genrl/findPage',
+        method: 'POST',
+        data: { "limit": -1, "pageNum": 1, "pageSize": 200, "groupId": groupId, "inspType": "", "mainType": false, "ojbNm": "", "persId": userid, "prjType": "", "type": "" }
+    })
+}
 /**
  * 稽察获取问题列表
  * @param {任务ID} rgstrId

+ 5 - 10
src/components/card01.vue

@@ -5,10 +5,6 @@
         <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;"/>
-          <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">
@@ -16,18 +12,17 @@
           <span v-else v-html="props.description"></span>
         </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 v-if="$slots.right" span="4" style="display: flex;justify-content: center;align-items: center;" >
+        <slot name="right" style="cursor: pointer;z-index: 999;color: red;"></slot>
       </van-col>
     </van-row>
   </div>
 </template>
 <script setup>
-import {defineEmits, defineProps} from 'vue';
+import {defineEmits, defineProps, ref} from 'vue';
 import {isString} from '@/utils/validate';
-
-const emits = defineEmits(['select']);
-
+const show = ref(false);
+const emits = defineEmits(['select', 'rightClick']);
 const props = defineProps({
   icon: {
     default: ''

+ 17 - 9
src/components/card02.vue

@@ -1,12 +1,12 @@
 <template>
   <div class="card-01-wrapper">
-    <van-icon
+    <!-- <van-icon
       name="delete-o"
       v-if="props.type == '督察中' || props.type == '未督察'"
       class="cardDelete"
       color="blue"
       size="20"
-    />
+    /> -->
     <van-row>
       <van-col :span="$slots.right ? 20 : 24" @click="emits('select')">
         <div class="card-01-header">
@@ -18,14 +18,14 @@
             style="margin-right: 5px"
           />
           <span class="cardTitle"
-            >福建省源通工程管理有限公司
-            <div v-if="props.type == '未督察'" class="cardText">未督察</div>
-            <div v-if="props.type == '督察中'" class="cardText2">督察中</div>
-            <div v-if="props.type == '已督察'" class="cardText3">已督察</div>
+            >{{ props.title }}
+            <div v-if="props.state == '未督察'" class="cardText">未督察</div>
+            <div v-if="props.state == '督察中'" class="cardText2">督察中</div>
+            <div v-if="props.state == '已督察'" class="cardText3">已督察</div>
           </span>
         </div>
         <div v-if="props.description" class="card-01-description">
-          <span>行政区划:福建省-南平市-光泽县</span>
+          <span>行政区划:{{ props.adFullName }}</span>
         </div>
       </van-col>
       <van-col
@@ -39,6 +39,7 @@
   </div>
 </template>
 <script setup>
+import { onMounted, ref ,computed  } from "vue";
 import { defineEmits, defineProps } from "vue";
 import { isString } from "@/utils/validate";
 
@@ -52,11 +53,15 @@ const props = defineProps({
     type: String,
     default: "",
   },
-  type: {
+  id: {
     type: String,
     default: "",
   },
-  description: {
+  state: {
+    type: String,
+    default: "",
+  },
+  adFullName: {
     type: String,
     default: "",
   },
@@ -65,6 +70,9 @@ const props = defineProps({
     default: false,
   },
 });
+onMounted(() => {
+  console.log("props", props);
+});
 </script>
 <style lang="scss" scoped>
 .card-01-wrapper {

+ 11 - 4
src/layout/components/BottomNav.vue

@@ -18,13 +18,13 @@
 </template>
 
 <script setup>
-import { ref } from "vue";
+import { onMounted, ref } from "vue";
 import { useRoute, useRouter } from "vue-router";
 import { useAppStore } from "@/stores/app";
 
 const appStore = useAppStore();
-
-const menuList = [
+const menuList = ref(
+  [
   { name: "首页", icon: "wap-home-o", path: "/home" },
   // { name: '一张图', icon: 'location-o', path: '/map' },
   {
@@ -38,7 +38,14 @@ const menuList = [
     path: appStore.ownApp === "1" ? "/wttjIndex" : "/problem",
   },
   { name: "我的", icon: "user-o", path: "/about" },
-];
+]
+)
+onMounted(() => {
+  if (appStore.ownApp === "1") {
+    menuList.value.shift()
+  }
+});
+
 
 const route = useRoute();
 const router = useRouter();

+ 12 - 0
src/router/index.js

@@ -62,6 +62,12 @@ const routes = [
         component: () => import("@/views/Problem/index.vue"),
         meta: { title: "问题列表" },
       },
+      {
+        path: "problemDc",
+        name: "problemDc",
+        component: () => import("@/views/Problem/indexDc.vue"),
+        meta: { title: "问题列表" },
+      },
       {
         path: "about",
         name: "about",
@@ -111,6 +117,12 @@ const routes = [
         component: () => import("@/views/Problem/detail/index.vue"),
         meta: { title: "问题详情", showBack: true },
       },
+      {
+        path: "problemDc/:id",
+        name: "problemDcDetail",
+        component: () => import("@/views/Problem/detail/indexDc.vue"),
+        meta: { title: "问题详情", showBack: true },
+      },
       {
         path: "problemAdd",
         name: "problemAdd",

+ 4 - 2
src/stores/user.js

@@ -3,14 +3,14 @@ import { defineStore } from 'pinia'
 import { setToken, getToken, removeToken } from '@/utils/auth'
 import { loginWithMessage, logout } from '@/api/login'
 import { useAppStore } from '@/stores/app'
-
+import { useRouter } from "vue-router";
 export const useUserStore = defineStore('user', () => {
   const userId = ref(localStorage.getItem('userid'))
   const nickname = ref(localStorage.getItem('account'))
   const orgName = ref(localStorage.getItem('orgNm'))
   const avatar = ref('')
   const roles = ref(localStorage.getItem('allNode'))
-
+  const router = useRouter();
   const token = ref(getToken())
 
   function setUserInfo(data) {
@@ -95,10 +95,12 @@ export const useUserStore = defineStore('user', () => {
   function LogOut() {
     return new Promise((resolve, reject) => {
       logout().then(() => {
+        router.push("/login");
         localStorage.clear()
         token.value = ""
         removeToken();
         resolve();
+        
       })
         .catch((error) => {
           reject(error);

+ 173 - 28
src/views/InspectDC/Object/Problem/index.vue

@@ -1,57 +1,202 @@
 <template>
   <div style="height: 100%; padding: 10px 0">
     <div class="xcdc">
-      <div class="xcdcJC">纠错</div>
+      <!-- <div class="xcdcJC">纠错</div> -->
       <div class="title">
-        <span class="titleLeft"></span> 福建省源通工程管理有限公司
+        <span class="titleLeft"></span> {{ formObj.nm }}
       </div>
-      <div class="xcdcCity">行政区化:福建省-南平市-光泽县</div>
-      <div class="xcdcDZ">经营地址:-</div>
-      <div class="xcdcLxr">
+      <!-- <div class="xcdcCity">行政区化:{{ data.adFullName }}</div> -->
+      <van-field
+        v-model="formObj.objType"
+        is-link
+        readonly
+        label="对象类型"
+        placeholder="选择对象"
+        @click="showPicker = true"
+      />
+      <van-popup v-model:show="showPicker" destroy-on-close round position="bottom">
+        <van-picker
+          :columns="columns"
+          @cancel="showPicker = false"
+          @confirm="onConfirm"
+        />
+      </van-popup>
+      <van-field v-model="formObj.code" readonly placeholder="请输入对象编码" label="对象编码" />
+      <!-- <van-field v-model="formObj.adCode" readonly label="行政区划编码" placeholder="请输入行政区划编码"/>
+      <van-field v-model="formObj.adName" readonly label="行政区划名称" placeholder="请输入行政区划名称"/> -->
+      <van-field v-model="formObj.loc" readonly label="地址" placeholder="请输入地址"/>
+      <!-- <van-field v-model="formObj.note" readonly label="备注" placeholder="请输入备注"/>
+      <van-field v-model="formObj.centerX" readonly label="经度" placeholder="请输入经度"/>
+      <van-field v-model="formObj.centerY" readonly label="纬度" placeholder="请输入纬度"/> -->
+      <!-- <div class="xcdcLxr">
         <div class="lxrItem">联系人:-</div>
         <div class="lxrItem">联系人电话:-</div>
       </div>
-      <div class="xcdcTJ">是否符合申请条件:符合</div>
-    </div>
-    <div class="xcdcFS">
-      <div class="fsItem">总分:-</div>
-      <div class="fsItem">评定得分:-</div>
-    </div>
-    <div class="xcdcXC" @click="xcglFn(1)">
-      <div class="XCfsItem"><span class="titleLeft"></span>现场管理</div>
-      <div class="XCqfItem">
-        <div>得分:-</div>
-        <div>缺项分:-</div>
-        <van-icon style="margin: auto 0" name="arrow" />
-      </div>
-    </div>
-    <div class="xcdcXC" @click="xcglFn(2)">
-      <div class="XCfsItem">
-        <span class="titleLeft"></span>安全风险管控及隐患
-      </div>
-      <div class="XCqfItem">
-        <div>得分:-</div>
-        <div>缺项分:-</div>
-        <van-icon style="margin: auto 0" name="arrow" />
-      </div>
+      <div class="xcdcTJ">是否符合申请条件:符合</div> -->
     </div>
+
+    <card01 v-for="pblm in pblmList" :key="pblm.pblmId" :title="pblm.inspPblmDesc" icon="question"
+            @click="jumpPage(`/problemDc/${pblm.objId}`, { object: JSON.stringify(pblm) })">
+      <template #right>
+        <van-icon color="#000" name="delete-o" size="1rem" @click.stop="deletePblm(pblm.pblmId)"/>
+      </template>
+    </card01>
     <div style="display: flex">
       <van-button
         style="margin: 15px auto; padding: 0 100px"
         size="small"
         type="primary"
+        @click="save128"
         >提交</van-button
       >
     </div>
+    <van-dialog v-model:show="showWhy" title="确认删除" show-cancel-button  @confirm="onConfirmDelete">
+      <van-field v-model="reason" placeholder="请输入对象名称" label="删除原因" />
+    </van-dialog>
   </div>
 </template>
 <script setup>
+import card01 from '@/components/card01.vue';
+import { onMounted, ref ,computed  } from "vue";
 import { useRoute } from "vue-router";
 import { jumpPage } from "@/utils/page";
+import request from "@/utils/request";
+import { showSuccessToast,showFailToast  } from 'vant';
 const router = useRoute();
 function xcglFn(val) {
   jumpPage(`/xcgl/${val}`);
 }
+const reason = ref('')
+const showWhy = ref(false);
+const showPicker = ref(false);
+const data = ref({});
+const pblmList = ref([]);
+const pblmId1 = ref('');
+const formObj = ref({
+  objectType: '',
+  code: '',
+  adCode: '',
+  adName: '',
+  loc: '',
+  note: '',
+  centerX: '',
+  centerY: ''
+});
+const columns = ref([
+    {
+      text: "小水库",
+      value: "小水库"
+    },
+    {
+      text: "大中型水库",
+      value: "大中型水库"
+    },
+    {
+      text: "在建水利工程",
+      value: "在建水利工程"
+    },  
+    {
+      text: "水闸工程",
+      value: "水闸工程"
+    },
+    {
+      text: "堤防工程",
+      value: "堤防工程"
+    },
+    {
+      text: "小水电站",
+      value: "小水电站"
+    },
+    {
+      text: "水利工程设施水毁修复",
+      value: "水利工程设施水毁修复"
+    },
+    {
+      text: "山洪灾害监测预警",
+      value: "山洪灾害监测预警"
+    },
+    {
+      text: "水旱灾害防御",
+      value: "水旱灾害防御"
+    },
+    {
+      text: "在建涉河建设项目和“清四乱”",
+      value: "在建涉河建设项目和“清四乱”"
+    },
+    {
+      text: "水利风景区",
+      value: "水利风景区"
+    },
+    
+  ]);
+async function onConfirmDelete() {
+  if(reason.value === ''){
+    showFailToast('请输入删除原因!');
+    showWhy.value = true;
+  }
+  else{
+    // 刷新问题列表
+    var problemForm = {
+      pblmDelPersnm: localStorage.getItem('account'),
+      pblmDelPers: localStorage.getItem('userid'),
+      date1: new Date(),
+      pblmDelNote: reason.value,
+      pblmId: pblmId1.value,
+    }
+    console.log(problemForm);
+    await request.post(`/dc/insp/pblm/insertPblmLog`, problemForm).then(res => {
+        if (res.success) {
+          request.get(`/dc/insp/pblm/delete/${problemForm.pblmId}/${problemForm.pblmDelPers}`).then(res=>{
+            if(res.success){
+              showWhy.value = false;
+              showSuccessToast('删除成功!');
+            }
+          })
+          
+        }
+    })
+    getData();
+  }
+}
+function onConfirm(selectedValues, selectedOptions) {
+  formObj.value.objectType = selectedValues.selectedValues[0]
+  showPicker.value = false;
+}
+function save128(){
+  request.post('/bis/insp/baseNew/update', formObj.value).then((res) => {
+    if (res.success) {
+      showSuccessToast('保存成功!');
+    }
+  });
+}
+
+function deletePblm(pblmId) {
+  pblmId1.value = pblmId;
+  showWhy.value = true;
+}
+function getData() {
+  var par = JSON.parse(router.query.object);
+  formObj.value = JSON.parse(router.query.object);
+  console.log(par);
+  request.get(`/bis/insp/baseNew/getByRgstr/${formObj.value.rgstrId}`).then(res=>{
+    if(res.success){
+      formObj.value = res.data;
+    }
+  })
+  var problemForm = {
+    objType:128,
+    objId: par.objId,
+    presId: localStorage.getItem("userid"),
+  }
+  request.post(`/dc/insp/pblm/list/${problemForm.presId}`, problemForm).then(res => {
+      if (res.success) {
+        pblmList.value = res.data.list;
+      }
+  })
+}
+onMounted(() => {
+  getData();
+});
 </script>
 <style lang="scss">
 .xcdc {

+ 61 - 23
src/views/InspectDC/Object/index.vue

@@ -2,7 +2,7 @@
   <div style="height: 100%">
     <van-tabs v-model:active="active">
       <van-tab :title="titleDC.name + '(' + titleDC.num + ')'">
-        <van-button
+        <!-- <van-button
           plain
           size="small"
           @click="wdcFn"
@@ -10,19 +10,20 @@
         >
           <van-icon color="#000" name="plus" size="1rem" />
           添加
-        </van-button>
+        </van-button> -->
         <van-pull-refresh
           class="inspect-object-wrapper"
           v-model="loading"
           @refresh="getData()"
         >
           <card02
-            v-for="item in list"
+            v-for="item in list1"
             :key="item"
-            :title="item.ojbNm + ''"
+            :id="item.id"
+            :title="item.nm + ''"
             icon="notes"
-            :type="titleDC.name"
-            :description="renderData(item, objectConfig.description)"
+            :state="item.state"
+            :adFullName="item.adFullName"
             @click="
               jumpPage(
                 `/InspectDC/${item.groupId}/object/${item.id}/problems`,
@@ -36,14 +37,15 @@
       ></van-tab>
       <van-tab :title="titleDC.name2 + '(' + titleDC.num2 + ')'">
         <card02
-          v-for="item in list"
+          v-for="item in list2"
           :key="item"
-          :title="item.ojbNm + ''"
+          :title="item.nm + ''"
+          :id="item.id"
+          :adFullName="item.adFullName"
           icon="notes"
-          :type="titleDC.name2"
-          :description="renderData(item, objectConfig.description)"
+          :state="item.state"
           @click="
-            jumpPage(`/inspect/${item.groupId}/object/${item.id}/problems`, {
+            jumpPage(`/InspectDC/${item.groupId}/object/${item.id}/problems`, {
               inspectType,
               object: JSON.stringify(item),
             })
@@ -51,14 +53,15 @@
       /></van-tab>
       <van-tab :title="titleDC.name3 + '(' + titleDC.num3 + ')'"
         ><card02
-          v-for="item in list"
+          v-for="item in list3"
           :key="item"
-          :title="item.ojbNm + ''"
+          :id="item.id"
+          :title="item.nm + ''"
+          :adFullName="item.adFullName"
           icon="notes"
-          :type="titleDC.name3"
-          :description="renderData(item, objectConfig.description)"
+          :state="item.state"
           @click="
-            jumpPage(`/inspect/${item.groupId}/object/${item.id}/problems`, {
+            jumpPage(`/InspectDC/${item.groupId}/object/${item.id}/problems`, {
               inspectType,
               object: JSON.stringify(item),
             })
@@ -68,24 +71,27 @@
   </div>
 </template>
 <script setup>
-import { onMounted, ref } from "vue";
+import { onMounted, ref ,computed  } from "vue";
 import { useRoute } from "vue-router";
 import card01 from "@/components/card01.vue";
 import card02 from "@/components/card02.vue";
-import { getObjectList } from "@/api/inspect";
+import { getObjectListDu } from "@/api/inspect";
 import { getBaseByInspectType } from "@/assets/js/base";
 import { renderData } from "@/utils/template";
 import { jumpPage } from "@/utils/page";
 
 const route = useRoute();
 const list = ref([]);
+const list1 = ref([]);
+const list2 = ref([]);
+const list3 = ref([]);
 const titleDC = ref({
   name: "未督察",
-  num: 3,
+  num: '',
   name2: "督察中",
-  num2: 1,
+  num2: '',
   name3: "已督察",
-  num3: 2,
+  num3: '',
 });
 const loading = ref(false);
 const inspectType = route.query.inspectType;
@@ -93,11 +99,43 @@ const objectConfig = ref(getBaseByInspectType(inspectType));
 function wdcFn() {
   jumpPage("/InspectDC/WDCproblems");
 }
+function countStates(arr) {
+  return arr.reduce((counts, item) => {
+    const state = item.state;
+    if (state === '0' || state === '1' || state === '2') {
+      counts[`state${state}`] = (counts[`state${state}`] || 0) + 1;
+    }
+    return counts;
+  }, { state0: 0, state1: 0, state2: 0 });
+}
 function getData() {
-  getObjectList(route.params.id).then((res) => {
-    list.value = res.data;
+  getObjectListDu(route.params.id).then((res) => {
+    list.value = res.data.list;
+    const counts = countStates(list.value);
+    titleDC.value.num = counts.state0;
+    titleDC.value.num2 = counts.state1;
+    titleDC.value.num3 = counts.state2;
+    list1.value = list.value.filter(item => item.state === '0');
+    list2.value = list.value.filter(item => item.state === '1');
+    list3.value = list.value.filter(item => item.state === '2');
     loading.value = false;
+    console.log(list1.value, list2.value, list3.value);
   });
+  
+  // list.value = [
+  //   {
+  //     id: 1,
+  //     ojbNm: "对象1",
+  //   },
+  //   {
+  //     id: 2,
+  //     ojbNm: "对象2",
+  //   },
+  //   {
+  //     id: 3,
+  //     ojbNm: "对象3",
+  //   },
+  // ];
 }
 
 onMounted(() => {

+ 3 - 2
src/views/InspectDC/history.vue

@@ -28,8 +28,8 @@ import card01 from "@/components/card01.vue";
 import { getInspBaseByPersid } from "@/api/inspect";
 import { jumpPage } from "@/utils/page";
 
-const inspectType = ref("008");
-const inspectTypes = [{ text: "督察类型", value: "008" }];
+const inspectType = ref('128');
+const inspectTypes = [{ text: "福建通用督察", value: '128' }];
 
 const baseBatch = ref(null);
 const baseBatchs = ref([]);
@@ -45,6 +45,7 @@ function getInspBase(value, level = 1) {
     return;
   }
   // 获取批次
+  console.log("value", value);
   getInspBaseByPersid(value).then((res) => {
     if (level === 3) {
       list.value = res.data;

+ 12 - 4
src/views/Login/index.vue

@@ -74,9 +74,12 @@ const router = useRouter();
 
 // 表单数据
 const form = ref({
-  phone: "13960760931",
-  captcha: "336699",
-  smsCode: "336699",
+  // phone: "13960760931",
+  // captcha: "336699",
+  // smsCode: "336699",
+  phone: "13401079738",
+  captcha: "170101",
+  smsCode: "170101",
 });
 
 // 图片验证码
@@ -153,7 +156,12 @@ function handleLogin() {
   userStore
     .Login(form.value.phone, form.value.captcha, form.value.smsCode)
     .then((res) => {
-      router.push("/");
+      console.log(appStore.ownApp);
+      if (appStore.ownApp === "1") {
+        router.push("/inspectDC");
+      } else {
+        router.push("/");
+      }
     });
 }
 

+ 302 - 0
src/views/Problem/detail/indexDc.vue

@@ -0,0 +1,302 @@
+<template>
+  <div class="pblm-detail-wrapper">
+    <van-form @submit="onSubmit">
+      <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.nm" placeholder="请输入对象名称" label="对象名称" />
+        <van-field
+            v-model="tacObjPblmstb.inspPblmsName"
+            is-link
+            readonly
+            label="问题类别"
+            placeholder="选择对象"
+            @click="showPicker = true"
+        />
+        <van-popup v-model:show="showPicker" destroy-on-close round position="bottom">
+            <van-picker
+            :columns="columns"
+            @change="changeC1"
+            @cancel="showPicker = false"
+            @confirm="onConfirm"
+            />
+        </van-popup>
+        <van-field
+            v-model="tacObjPblmstb.checkPoint"
+            is-link
+            readonly
+            label="问题项目"
+            placeholder="选择对象"
+            @click="showPicker1 = true"
+        />
+        <van-popup v-model:show="showPicker1" destroy-on-close round position="bottom">
+            <van-picker
+            :columns="columns1"
+            @change="changeC2"
+            @cancel="showPicker1 = false"
+            @confirm="onConfirm1"
+            />
+        </van-popup>
+        <van-field
+            v-model="tacObjPblmstb.pblmDesc"
+            is-link
+            readonly
+            label="问题描述"
+            placeholder="选择对象"
+            @click="showPicker2 = true"
+        />
+        <van-popup v-model:show="showPicker2" destroy-on-close round position="bottom">
+            <van-picker
+            :columns="columns2"
+            @cancel="showPicker2 = false"
+            @confirm="onConfirm2"
+            />
+        </van-popup>
+        <van-field v-model="tacObjPblmstb.inspPblmOrgName" placeholder="请输入对象名称" label="问题责任单位" />
+        <van-field v-model="tacObjPblmstb.inspPblmDesc" placeholder="请输入对象名称" label="详细描述" rows="1" type="textarea"/>
+        <van-field
+            v-model="tacObjPblmstb.ifCasePblm"
+            is-link
+            readonly
+            label="是否典型问题"
+            placeholder=""
+            @click="showPicker3 = true"
+        />
+        <van-popup v-model:show="showPicker3" destroy-on-close round position="bottom">
+            <van-picker
+            :columns="columns3"
+            :model-value="pickerValue3"
+            @cancel="showPicker3 = false"
+            @confirm="onConfirm3"
+            />
+        </van-popup>
+        <van-field v-model="tacObjPblmstb.score" readonly label="扣分值" />
+        <van-field v-model="tacObjPblmstb.persName" readonly label="上报人" />
+        <van-field v-model="tacObjPblmstb.collTime" readonly label="上报时间" />
+      </van-cell-group>
+      <div style="margin: 16px;">
+        <van-button @click="save" 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 { showSuccessToast } from 'vant';
+import {computed, onMounted, ref, watch} from "vue";
+import {useRoute} from "vue-router";
+import tacObjPblmstbList from './TacObjPblmstbList.vue';
+import {getTacQuestionById} from "@/api/inspect";
+import {addTacQuestion, getIllegalActById, getTacUnitList} from "@/api/questions";
+import {useUserStore} from "@/stores/user";
+import request from "@/utils/request";
+const route = useRoute();
+const userStore = useUserStore();
+const listType = ref(route.query.inspectType || '1');
+const pblm = ref({});
+const tacObjPblmstb =  ref({
+});
+const columns = ref([]);
+const columns1 = ref([]);
+const columns2 = ref([]);
+const columns3 = ref([
+    { text: '是', value: '1' },
+    { text: '否', value: '0' }
+]);
+const showPicker = ref(false);
+const showPicker1 = ref(false);
+const showPicker2 = ref(false);
+const showPicker3 = ref(false);
+const pickerValue3 = ref([])
+const pickerValue = ref([])
+const pickerValue1 = ref([])
+const pickerValue2 = ref([])
+const router = useRoute();
+const parSectino = ref([]);
+const subjectList = ref([]);
+const tacObjPblmstbShow = ref(false);
+function onConfirm3(selectedValues, selectedOptions) {
+  tacObjPblmstb.value.ifCasePblm = selectedValues.selectedOptions[0].text
+  showPicker3.value = false;
+}
+function onConfirm(selectedValues, selectedOptions) {
+  tacObjPblmstb.value.inspPblmsName = selectedValues.selectedOptions[0].text
+  showPicker.value = false;
+}
+function onConfirm1(selectedValues, selectedOptions) {
+  tacObjPblmstb.value.checkPoint = selectedValues.selectedOptions[0].text
+  showPicker1.value = false;
+}
+function onConfirm2(selectedValues, selectedOptions) {
+  tacObjPblmstb.value.pblmDesc = selectedValues.selectedOptions[0].text
+  showPicker2.value = false;
+}
+function changeC1(selectedValues, selectedOptions) {
+  columns1.value = []
+  columns2.value = []
+  parSectino.value.forEach(item => {
+    if(item.inspPblmsName === selectedValues.selectedValues[0]){
+        var par = {
+            text: item.checkPoint,
+            value: item.checkPoint
+        }
+        columns1.value.push(par);
+    }
+    columns1.value = [...new Set(columns1.value.map(item => JSON.stringify(item)))].map(str => JSON.parse(str))
+  })
+}
+function changeC2(selectedValues, selectedOptions) {
+  columns2.value = []
+  parSectino.value.forEach(item => {
+    if(item.checkPoint === selectedValues.selectedValues[0]){
+        var par = {
+            text: item.pblmDesc,
+            value: item.pblmDesc
+        }
+        columns2.value.push(par);
+    }
+    columns2.value = [...new Set(columns2.value.map(item => JSON.stringify(item)))].map(str => JSON.parse(str))
+  })
+  console.log(columns1.value)
+}
+function formatTime(timestamp) {
+  const date = new Date(timestamp);
+  const year = date.getFullYear();
+  const month = ('0' + (date.getMonth() + 1)).slice(-2);
+  const day = ('0' + date.getDate()).slice(-2);
+  const hours = ('0' + date.getHours()).slice(-2);
+  const minutes = ('0' + date.getMinutes()).slice(-2);
+  const seconds = ('0' + date.getSeconds()).slice(-2);
+  
+  return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
+}
+async function getSelection(){
+    await request.get(`/dc/insp/pblms/listByObjId/${pblm.value.objId}`).then(res=>{
+        parSectino.value = res.data
+        const uniqueInspPblmsName = [...new Set(res.data.map(item => item.inspPblmsName))];
+        const uniquePblmDesc = [...new Set(res.data.map(item => item.pblmDesc))];
+        const uniqueCheckPoint = [...new Set(res.data.map(item => item.checkPoint))];
+        // columns1.value = uniqueCheckPoint.map(item => ({ text: item, value: item }));
+        // columns2.value = uniquePblmDesc.map(item => ({ text: item, value: item }));
+        columns.value = uniqueInspPblmsName.map(item => ({ text: item, value: item }));
+    })
+}
+const parData = ref({});
+function getDe(){
+    request.get(`/dc/insp/pblm/${pblm.value.pblmId}`).then(res=>{
+        if(res.success){
+            parData.value = res.data
+            tacObjPblmstb.value = res.data;
+            tacObjPblmstb.value.ifCasePblm = tacObjPblmstb.value.ifCasePblm === '1' ? '是' : '否';
+            tacObjPblmstb.value.collTime = formatTime(tacObjPblmstb.value.collTime);
+            columns1.value = []
+            columns2.value = []
+            parSectino.value.forEach(item => {
+                if(item.inspPblmsName === tacObjPblmstb.value.inspPblmsName){
+                    console.log(item);
+                    var par = {
+                        text: item.checkPoint,
+                        value: item.checkPoint
+                    }
+                    columns1.value.push(par);
+                }
+                columns1.value = [...new Set(columns1.value.map(item => JSON.stringify(item)))].map(str => JSON.parse(str))
+            })
+            parSectino.value.forEach(item => {
+                if(item.checkPoint === tacObjPblmstb.value.checkPoint){
+                    console.log(item);
+                    var par = {
+                        text: item.pblmDesc,
+                        value: item.pblmDesc
+                    }
+                    columns2.value.push(par);
+                }
+                columns2.value = [...new Set(columns2.value.map(item => JSON.stringify(item)))].map(str => JSON.parse(str))
+            })
+        }
+    })
+}
+async function save(){
+    console.log(tacObjPblmstb.value);
+    tacObjPblmstb.value.ifCasePblm = tacObjPblmstb.value.ifCasePblm === '是' ? '1' : '0';
+    // tacObjPblmstb.value.collTime = parData.value.collTime;
+    delete tacObjPblmstb.value.inspPblmCode;
+    delete tacObjPblmstb.value.pblmsTypeId;
+    delete tacObjPblmstb.value.collTime;
+    await request.post('/dc/insp/pblm/update', tacObjPblmstb.value).then((res) => {
+        if (res.success) {
+            showSuccessToast('保存成功!');
+        }
+    });
+    getDe();
+}
+watch(() => tacObjPblmstb.value.inspPblmsName, (newVal, oldVal) => {
+    if (newVal !== oldVal) {
+        columns1.value = []
+        columns2.value = []
+        parSectino.value.forEach(item => {
+            if(item.inspPblmsName === newVal){
+                var par = {
+                    text: item.checkPoint,
+                    value: item.checkPoint
+                }
+                columns1.value.push(par);
+            }
+            columns1.value = [...new Set(columns1.value.map(item => JSON.stringify(item)))].map(str => JSON.parse(str))
+        })
+    }
+});
+watch(() => tacObjPblmstb.value.checkPoint, (newVal, oldVal) => {
+    if (newVal !== oldVal) {
+        columns2.value = []
+        parSectino.value.forEach(item => {
+            if(item.checkPoint === newVal){
+                var par = {
+                    text: item.pblmDesc,
+                    value: item.pblmDesc
+                }
+                columns2.value.push(par);
+            }
+            columns2.value = [...new Set(columns2.value.map(item => JSON.stringify(item)))].map(str => JSON.parse(str))
+        })
+    }
+});
+onMounted(() => {
+  var par = JSON.parse(router.query.object);
+  pblm.value.objId = par.objId
+  pblm.value.pblmId = par.pblmId;
+  getSelection().then(() => {
+    getDe();
+  })
+})
+
+</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;
+  }
+
+}
+</style>
+<style lang="scss">
+.van-cell-group--inset {
+  margin: 0 10px;
+}
+</style>

+ 32 - 0
src/views/Problem/indexDc.vue

@@ -0,0 +1,32 @@
+<template>
+  <van-tabs v-model="active" @click-tab="onClickTab">
+    123
+  </van-tabs>
+</template>
+
+<script setup>
+
+import { ref } from "vue";
+import ListQuestions from "./listquestions.vue";
+import QuestionsTatistics from "./questionstatistics.vue";
+import { showToast } from 'vant';
+
+
+const active = ref('问题清单');
+const onClickTab = ({ title }) => showToast(title);
+
+</script>
+<style scoped>
+.van-tabs {
+  height: 100%;
+}
+
+.van-tabs__content {
+  height: calc(100% - 44px);
+
+  .van-tab__panel {
+    height: 100% !important;
+  }
+
+}
+</style>

+ 6 - 5
vue.config.js

@@ -24,11 +24,12 @@ module.exports = defineConfig({
         },
         proxy: {
             '/pdcApi': {
-                target: 'https://app.slt.fujian.gov.cn:18185', // 你的后端服务器地址
-                changeOrigin: true, // 需要虚拟托管站点
-                // pathRewrite: {
-                //     '^/pdcApi': '' // 移除路径中的/api前缀
-                // }
+                // target: 'https://app.slt.fujian.gov.cn:', // 你的后端服务器地址
+                changeOrigin: true,
+                target: 'http://39.98.38.2:18089/dc-api/',
+                pathRewrite: {
+                    '^/pdcApi': '' // 移除路径中的/api18185前缀
+                }
             }
         }
     },