敲代码的猫 1 hónapja
szülő
commit
618643cf77

+ 33 - 3
src/api/screen/service.js

@@ -847,13 +847,40 @@ export function getProjectCameraNumList(appOrg) {
 }
 }
 
 
 // 近一周问题列表
 // 近一周问题列表
-export function getIssueListLastWeek(appOrg) {
+export function getIssueListLastWeek(appOrg, date = null) {
+  let url = `large/check/getIssueListLastWeek/${appOrg}`;
+  if (date) {
+    url += `?day=${date}`;
+  }
   return request({
   return request({
-    url: 'large/check/getIssueListLastWeek/' + appOrg,
+    url,
     method: 'get'
     method: 'get'
-  })
+  });
+}
+
+// 更改问题状态
+export function changeIssueStatus(data) {
+  return request({
+    url: '/large/check/changeIssueStatus', 
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json', 
+    },
+  });
 }
 }
 
 
+// 提交问题
+export function add(data) {
+  return request({
+    url: '/check/large/issue/add', 
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'application/json', 
+    },
+  });
+}
 // 本周检查项目数量
 // 本周检查项目数量
 export function getProjectNumThisWeek(appOrg) {
 export function getProjectNumThisWeek(appOrg) {
   return request({
   return request({
@@ -900,6 +927,9 @@ export function etCameraNumList(appOrg) {
     method: 'get'
     method: 'get'
   })
   })
 }
 }
+
+
+
 /*--------------- 公务用车 ------------------*/
 /*--------------- 公务用车 ------------------*/
 
 
 // 资源台账
 // 资源台账

+ 94 - 50
src/views/screen/engineering/issueListDia.vue

@@ -1,15 +1,16 @@
 <template>
 <template>
   <div class="myDia">
   <div class="myDia">
     <!-- 日期选择器和其他操作 -->
     <!-- 日期选择器和其他操作 -->
-    <div style="margin-bottom: 26px;display: flex;position: relative;width: 100%"  class="dataPlicker">
+    <div style="margin-bottom: 26px;display: flex;position: relative;width: 100%" class="dataPlicker">
       <el-date-picker
       <el-date-picker
         v-model="value"
         v-model="value"
         type="date"
         type="date"
-        placeholder="选择日期">
+        placeholder="选择日期"
+        @change="handleDateChange">
       </el-date-picker>
       </el-date-picker>
-      <div style="border: 1px #00ffff solid;display: flex;justify-content: center;align-items: center;margin-left: 10px;width: 100px;color: #00ffff;cursor: pointer" @click="choose">
+      <!-- <div style="border: 1px #00ffff solid;display: flex;justify-content: center;align-items: center;margin-left: 10px;width: 100px;color: #00ffff;cursor: pointer" @click="choose">
         <i class="el-icon-plus"><span style="margin-left: 10px">上报问题</span></i>
         <i class="el-icon-plus"><span style="margin-left: 10px">上报问题</span></i>
-      </div>
+      </div> -->
       <div style="position: absolute;right: 10px;color: #00ffff;font-size: 25px;cursor: pointer" @click="close">
       <div style="position: absolute;right: 10px;color: #00ffff;font-size: 25px;cursor: pointer" @click="close">
         <img src="../../../assets/zhang/engineer/ownCloseBtn.png">
         <img src="../../../assets/zhang/engineer/ownCloseBtn.png">
       </div>
       </div>
@@ -26,18 +27,18 @@
         <div class="flex-column" style="width: 15%">操作</div>
         <div class="flex-column" style="width: 15%">操作</div>
       </div>
       </div>
       <div class="flex-row" v-for="(item, index) in paginatedData" :key="index">
       <div class="flex-row" v-for="(item, index) in paginatedData" :key="index">
-        <div class="flex-column" style="width: 15%">{{ item.a }}</div>
-        <div class="flex-column" style="width: 15%">{{ item.b }}</div>
-        <div class="flex-column" style="width: 30%">{{ item.c }}</div>
-        <div class="flex-column" style="width: 15%">{{ item.d }}</div>
+        <div class="flex-column" style="width: 15%">{{ item.createDate }}</div>
+        <div class="flex-column" style="width: 15%">{{ item.title }}</div>
+        <div class="flex-column" style="width: 30%">{{ item.description }}</div>
+        <div class="flex-column" style="width: 15%">{{ item.person }}</div>
         <div class="flex-column" style="width: 10%">
         <div class="flex-column" style="width: 10%">
-          <span v-if="item.e === 1"><span style="color: #67C23A">●</span> 已完结</span>
-          <span v-if="item.e === 0"><span style="color: #FAAD14">●</span> 处理中</span>
+          <span v-if="item.status == 0"><span style="color: #67C23A">●</span> 已完结</span>
+          <span v-if="item.status == 1"><span style="color: #FAAD14">●</span> 处理中</span>
         </div>
         </div>
         <div class="flex-column" style="width: 15%">
         <div class="flex-column" style="width: 15%">
-          <span v-if="item.e === 1"></span>
-          <span v-if="item.e === 0" style="color: #00FFFF;cursor: pointer" @click="deal()">变更状态</span>
-          <div v-if="item.e === 0" class="wanjie">已完结</div>
+          <span v-if="item.status == 0"></span>
+          <span v-if="item.status == 1" style="color: #00FFFF;cursor: pointer" @click="togglePost(item)">变更状态</span>
+          <div v-if="item.status == 1&&item.isShowPost" class="wanjie" @click="changeIssueStatus(item.id)">已完结</div>
         </div>
         </div>
       </div>
       </div>
     </div>
     </div>
@@ -57,62 +58,106 @@
 </template>
 </template>
 
 
 <script>
 <script>
+import { getIssueListLastWeek,changeIssueStatus } from '@/api/screen/service';
+
 export default {
 export default {
   name: "UnitCamera",
   name: "UnitCamera",
+  props: {
+    appOrg: {
+      type: String,
+      default: "10001",
+    },
+  },
   data() {
   data() {
-    return {
-      value: "2020-02-09",
-      dataList: [
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 1 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 1 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 0 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 1 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 1 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 1 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 1 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 0 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 1 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 1 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 1 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 0 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 1 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 1 },
-        { a: "2024/12/28", b: "施工整改问题1", c: "施工整改问题具体内容", d: "张三", e: 1 },
-      
-      ],
-      currentPage: 1, 
-      pageSize: 10, 
-      total: 0, 
+    return {  
+      value: null, 
+      getProList: [],
+      // showPost:false,
+      currentPage: 1,
+      pageSize: 10,
+      total: 0,
     };
     };
   },
   },
   computed: {
   computed: {
-    // 计算分页后的数据
     paginatedData() {
     paginatedData() {
       const start = (this.currentPage - 1) * this.pageSize;
       const start = (this.currentPage - 1) * this.pageSize;
       const end = start + this.pageSize;
       const end = start + this.pageSize;
-      return this.dataList.slice(start, end);
+      return this.getProList.slice(start, end);
     },
     },
   },
   },
+  created() {
+    this.getIssueListLastWeek();
+  },
   mounted() {
   mounted() {
-    const style = document.createElement('style');
+  const style = document.createElement('style');
   style.innerHTML = `
   style.innerHTML = `
     .el-picker-panel.el-date-picker {
     .el-picker-panel.el-date-picker {
       background: #062223 !important;
       background: #062223 !important;
     }
     }
   `;
   `;
   document.head.appendChild(style);
   document.head.appendChild(style);
-  this.total = this.dataList.length;
-  },
-  methods: {
-    choose() {
-      this.$emit("subIssue");
+},
+methods: {
+    // 获取近一周问题列表
+    getIssueListLastWeek() {
+      if (this.value) {
+        const selectedDate = this.formatDate(this.value); 
+        getIssueListLastWeek(this.$props.appOrg, selectedDate).then((res) => {
+          if (Number(res.code) === 200) {
+            this.getProList = (res.data || []).map(item => ({
+              ...item,
+              isShowPost: false
+            }));
+            this.total = this.getProList.length;
+          }
+        });
+      } else {
+        getIssueListLastWeek(this.$props.appOrg).then((res) => {
+          if (Number(res.code) === 200) {
+            this.getProList = (res.data || []).map(item => ({
+              ...item,
+              isShowPost: false
+            }));
+            this.total = this.getProList.length;
+          }
+        });
+      }
     },
     },
-
-    deal() {
-      
-      // this.$emit("dealIssue");
+    // 日期格式化方法
+    formatDate(date) {
+      const d = new Date(date);
+      const year = d.getFullYear();
+      const month = String(d.getMonth() + 1).padStart(2, "0");
+      const day = String(d.getDate()).padStart(2, "0");
+      return `${year}-${month}-${day}`;
+    },
+    // 处理日期选择器变化
+    handleDateChange() {
+      this.currentPage = 1; // 重置分页
+      this.getIssueListLastWeek(); // 刷新数据
+    },
+    togglePost(item) {
+      // 关闭所有其他条目
+      this.getProList.forEach(i => {
+        if (i.id !== item.id) i.isShowPost = false;
+      });
+      // 切换当前条目状态
+      item.isShowPost = !item.isShowPost;
     },
     },
+    changeIssueStatus(f) {
+      const issueData = {
+        id: f,
+        status: 0,
+      };
 
 
+      changeIssueStatus(issueData).then((res) => {
+        if (Number(res.code) === 200) {
+          this.getIssueListLastWeek(); // 刷新数据
+        }
+      }).catch((err) => {
+        console.error("修改状态失败:", err);
+      });
+    },
     close() {
     close() {
       this.$emit("close");
       this.$emit("close");
     },
     },
@@ -122,7 +167,6 @@ export default {
   },
   },
 };
 };
 </script>
 </script>
-
 <style lang="scss" scoped>
 <style lang="scss" scoped>
 .me{
 .me{
   display: flex;flex-wrap: wrap;justify-content: space-around;height: 380px;overflow: auto;
   display: flex;flex-wrap: wrap;justify-content: space-around;height: 380px;overflow: auto;
@@ -214,7 +258,7 @@ export default {
     justify-content: center;
     justify-content: center;
     align-items: center;
     align-items: center;
     color: #00F0ff;
     color: #00F0ff;
-    display: none;
+    cursor: pointer;
 }
 }
 
 
 ::v-deep .el-input__inner{
 ::v-deep .el-input__inner{

+ 1 - 1
src/views/screen/engineering/unitAccess.vue

@@ -15,7 +15,7 @@
               <div style="position: absolute;right: 0;height: 100%;width: 10px;border: 1px solid #00FFFF;border-left: none; "></div>
               <div style="position: absolute;right: 0;height: 100%;width: 10px;border: 1px solid #00FFFF;border-left: none; "></div>
               <div style="position: absolute;left: 0;height: 100%;width: 10px;border: 1px solid #00FFFF;border-right: none; "></div>
               <div style="position: absolute;left: 0;height: 100%;width: 10px;border: 1px solid #00FFFF;border-right: none; "></div>
               <div style="width: 294.15px;height: 52.5px;background-image: linear-gradient(270deg, #00ffff00 0%, #00ffff1a 100%);display: flex;justify-content: space-around;align-items: center">
               <div style="width: 294.15px;height: 52.5px;background-image: linear-gradient(270deg, #00ffff00 0%, #00ffff1a 100%);display: flex;justify-content: space-around;align-items: center">
-                <div style="width: 96px;font-family: DingTalk-JinBuTi;font-weight: JinBuTi;font-size: 24px;color: #00FFFF;letter-spacing: 0;line-height: 32.93px;">在建项目</div>
+                <div style="font-family: DingTalk-JinBuTi;font-weight: JinBuTi;font-size: 24px;color: #00FFFF;letter-spacing: 0;line-height: 32.93px;">在建项目</div>
                 <div style="font-size: 38px;letter-spacing: 6px;color: #00FFFF;font-family: 'electronicFont'">{{ num }}<span style="font-size: 12px">个</span></div>
                 <div style="font-size: 38px;letter-spacing: 6px;color: #00FFFF;font-family: 'electronicFont'">{{ num }}<span style="font-size: 12px">个</span></div>
               </div>
               </div>
 
 

+ 1 - 1
src/views/screen/engineering/unitAccessDialog.vue

@@ -24,7 +24,7 @@
               <div style="position: absolute;right: 0;height: 100%;width: 10px;border: 1px solid #00FFFF;border-left: none; "></div>
               <div style="position: absolute;right: 0;height: 100%;width: 10px;border: 1px solid #00FFFF;border-left: none; "></div>
               <div style="position: absolute;left: 0;height: 100%;width: 10px;border: 1px solid #00FFFF;border-right: none; "></div>
               <div style="position: absolute;left: 0;height: 100%;width: 10px;border: 1px solid #00FFFF;border-right: none; "></div>
               <div style="width: 294.15px;height: 52.5px;background-image: linear-gradient(270deg, #00ffff00 0%, #00ffff1a 100%);display: flex;justify-content: space-around;align-items: center">
               <div style="width: 294.15px;height: 52.5px;background-image: linear-gradient(270deg, #00ffff00 0%, #00ffff1a 100%);display: flex;justify-content: space-around;align-items: center">
-                <div style="width: 96px;font-family: DingTalk-JinBuTi;font-weight: JinBuTi;font-size: 24px;color: #00FFFF;letter-spacing: 0;line-height: 32.93px;">在建项目</div>
+                <div style="font-family: DingTalk-JinBuTi;font-weight: JinBuTi;font-size: 24px;color: #00FFFF;letter-spacing: 0;line-height: 32.93px;">在建项目</div>
                 <div style="font-size: 38px;letter-spacing: 6px;color: #00FFFF;font-family: 'electronicFont'">{{ num }}<span style="font-size: 12px">个</span></div>
                 <div style="font-size: 38px;letter-spacing: 6px;color: #00FFFF;font-family: 'electronicFont'">{{ num }}<span style="font-size: 12px">个</span></div>
               </div>
               </div>
             </div>
             </div>