Browse Source

修改督办提交bug

xiao-xx 4 months ago
parent
commit
43e4ae421e
3 changed files with 67 additions and 20 deletions
  1. 1 1
      .env.development
  2. 28 4
      src/views/offcial/mysupervision/index.vue
  3. 38 15
      src/views/offcial/weekly/index.vue

+ 1 - 1
.env.development

@@ -9,4 +9,4 @@ VITE_APP_BASE_API = '/dev-api'
 
 
 VITE_APP_KKFILE1 ='http://192.168.1.42:8080'
-VITE_APP_KKFILE2 ="http://192.168.1.56:8201/onlinePreview?url="
+VITE_APP_KKFILE2 ="http://192.168.1.42:8201/onlinePreview?url="

+ 28 - 4
src/views/offcial/mysupervision/index.vue

@@ -142,7 +142,6 @@
       <!-- <el-table-column label="议定事项" align="center" prop="itemPostil" /> -->
       <el-table-column label="责任处室" align="center" prop="prersonLiable" />
 
-      <!-- <el-table-column label="进展情况" align="center" prop="progress" /> -->
       <el-table-column
         width="80"
         label="进度评价"
@@ -222,6 +221,14 @@
             @click="handleView(scope.row)"
             >查看</el-button
           >
+          <el-button
+            v-if="scope.row.submitState == '2'"
+            v-hasPermi="['offcial:supervision:edit']"
+            link
+            type="primary"
+            icon="TopRight"
+            @click="saveArchive1(scope.row)"
+            >归档</el-button >
           <el-button
             v-if="scope.row.submitState == '2'"
             v-hasPermi="['offcial:supervision:reapply']"
@@ -229,8 +236,7 @@
             type="success"
             icon="TopRight"
             @click="handleUpdate(scope.row)"
-            >再次发起</el-button
-          >
+            >再次发起</el-button >
           <el-button
             v-if="scope.row.isCb == 'Y'&&scope.row.progressEva!=1"
             v-hasPermi="['offcial:supervision:expediting']"
@@ -315,7 +321,7 @@ import Supervise from "@/views/liucheng/todowork/formView/Supervise.vue";
 import SuperviseEdit from "@/views/clocking/SuperviseTijiao.vue";
 import SuperviseZaiCiTijiao from "@/views/clocking/SuperviseZaiCiTijiao.vue";
 import SuperviseAdd from "@/views/clocking/Supervise.vue";
-
+import { saveArchive } from "@/api/archive/archive";
 const { proxy } = getCurrentInstance();
 
 const supervisionList = ref([]);
@@ -476,6 +482,24 @@ function handleAdd() {
   title.value = "添加督办";
 }
 
+/** 再次发起操作 */
+function saveArchive1(row) {
+  var archiveData={
+    archiveFormNo:"016",
+    workId:row.id,
+  };
+   saveArchive(archiveData).then(res=>{
+     var superData={
+       id: row.id,
+       submitState: "3",
+     };
+     updateSupervision(superData).then((response) => {
+       proxy.$modal.msgSuccess("归档成功");
+       open.value = false;
+       getList();
+     });
+   })
+}
 /** 再次发起操作 */
 function handleUpdate(row) {
   dialogVisibleSuperviseZaiCi.value = true;

+ 38 - 15
src/views/offcial/weekly/index.vue

@@ -132,7 +132,7 @@
           >导出处室汇总</el-button
         >
         <el-button
-          v-hasPermi="['offcial:weekly:yl ']"
+          v-hasPermi="['offcial:weekly:yl']"
           type="success"
           plain
           icon="view"
@@ -164,23 +164,27 @@
         align="center"
         class-name="small-padding fixed-width"
       >
-        <template #default="scope">
-          <el-button
+        <template #default="scope" >
+          <el-button v-if="userId==scope.row.userId"
             link
             type="primary"
             icon="Edit"
             @click="handleUpdate(scope.row)"
             v-hasPermi="['offcial:weekly:edit']"
-            >修改</el-button
-          >
-          <el-button
+            >修改</el-button >
+          <el-button v-if="userId==scope.row.userId"
             link
             type="primary"
             icon="Delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['offcial:weekly:remove']"
-            >删除</el-button
-          >
+            >删除</el-button  >
+          <el-button v-else
+              link
+              type="primary"
+              icon="view"
+              @click="handleUpdate(scope.row)"
+          >查看</el-button >
         </template>
       </el-table-column>
     </el-table>
@@ -203,7 +207,7 @@
         label-width="80px"
       >
         <!-- <el-form-item label="周数" prop="periods">
-     
+
         </el-form-item> -->
         <el-form-item label="周数">
           <el-input disabled v-model="form1.periods" />
@@ -225,7 +229,7 @@
           <el-input disabled v-model="form.deptName" placeholder="" />
         </el-form-item>
         <el-divider content-position="center">周报事务信息</el-divider>
-        <el-row :gutter="10" class="mb8">
+        <el-row :gutter="10" class="mb8"  v-if="!form.userId||userId==form.userId">
           <el-col :span="1.5">
             <el-button type="primary" icon="Plus" @click="handleAddYwWeeklyItem"
               >添加</el-button
@@ -339,7 +343,7 @@
           </el-table-column> -->
         </el-table>
       </el-form>
-      <template #footer>
+      <template #footer  v-if="!form.userId||userId==form.userId">
         <div class="dialog-footer">
           <el-button @click="cancel">取 消</el-button>
           <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -400,7 +404,6 @@ import { Base64 } from "js-base64";
 import moment from "moment"; //导入文件
 import { init } from "echarts";
 const { proxy } = getCurrentInstance();
-
 const weeklyList = ref([]);
 const gridData = ref([]);
 const ywWeeklyItemList = ref([]);
@@ -420,6 +423,7 @@ const title = ref("");
 const weekNum = ref(null);
 const selectionValue = ref(null);
 const rowValue = ref(null);
+const userId = ref(null);
 const dateRange = ref("");
 const { sys_yes_no, zb_type } = proxy.useDict("sys_yes_no", "zb_type");
 const data = reactive({
@@ -458,13 +462,19 @@ function handleView() {
     );
   });
 }
+huoquUserId()
+function huoquUserId(){
+  getInfo().then((res) => {
+    userId.value=res.user.userId
+  });
+}
 function handleJinzhanYwWeeklyItem() {
   myselfDb({ orderByColumn: "createTime", isAsc: "Desc" }).then((res) => {
     if (res.rows.length > 0) {
       dialogTableVisible.value = true;
       gridData.value = res.rows;
     } else {
-      proxy.$modal.msgError("暂无可选督办事项,请手动填写");
+      // proxy.$modal.msgError("暂无可选督办事项,请手动填写");
     }
   });
 }
@@ -476,7 +486,7 @@ function addThing(row) {
       dialogTableVisible.value = true;
       gridData.value = res.rows;
     } else {
-      proxy.$modal.msgError("暂无可选督办事项,请手动填写");
+      // proxy.$modal.msgError("暂无可选督办事项,请手动填写");
     }
   });
 }
@@ -676,7 +686,7 @@ function handleAdd() {
         });
       }
     } else {
-      proxy.$modal.msgError("暂无可选督办事项,请手动填写");
+      // proxy.$modal.msgError("暂无可选督办事项,请手动填写");
     }
   });
 }
@@ -694,6 +704,19 @@ function handleUpdate(row) {
     title.value = "修改周报";
   });
 }
+/** 修改按钮操作 */
+function selWeek(row) {
+  reset();
+  const _id = row.id || ids.value;
+  getWeekly(_id).then((response) => {
+    form1.value.periods = Number(response.data.periods) + "周";
+    console.log("form1.value.periods", form1.value.periods);
+    form.value = response.data;
+    ywWeeklyItemList.value = response.data.ywWeeklyItemList;
+    open.value = true;
+    title.value = "查看周报";
+  });
+}
 
 /** 提交按钮 */
 function submitForm() {