杜迪迪 4 mesiacov pred
rodič
commit
5fc697f48e

+ 31 - 8
src/views/offcial/supervision/index.vue

@@ -92,15 +92,15 @@
           >提交</el-button
         > -->
       </el-col>
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button type="primary" plain icon="plus" @click="addDuban"
           >添加</el-button
         >
-      </el-col>
+      </el-col> -->
       <el-col :span="1.5">
         <el-button
           v-hasPermi="['offcial:supervision:expediting']"
-          type="danger"
+          type="success"
           plain
           icon="Position"
           @click="piliang"
@@ -117,7 +117,16 @@
           >导出</el-button
         >
       </el-col>
-
+      <el-col :span="1.5">
+        <el-button
+          v-hasPermi="['offcial:supervision:remove']"
+          type="danger"
+          plain
+          icon="delete"
+          @click="piliang"
+          >删除</el-button
+        >
+      </el-col>
       <right-toolbar
         v-model:showSearch="showSearch"
         @queryTable="getList"
@@ -217,19 +226,20 @@
             "
             v-hasPermi="['offcial:supervision:expediting']"
             link
-            type="danger"
+            type="success"
             icon="Position"
             @click="handleUrge(scope.row)"
             >催办</el-button
           >
-          <!-- <el-button
+          <el-button
+            v-if="scope.row.submitState != 3"
             link
-            type="primary"
+            type="danger"
             icon="Delete"
             @click="handleDelete(scope.row)"
             v-hasPermi="['offcial:supervision:remove']"
             >删除</el-button
-          > -->
+          >
         </template>
       </el-table-column>
     </el-table>
@@ -343,6 +353,19 @@ function isRowSelectable(row) {
   // 只有状态为'active'的行可选
   // return row.submitState == 0 || row.submitState == null;
 }
+function handleDelete(row) {
+  const supervisionIds = row.id || ids.value;
+  proxy.$modal
+    .confirm("是否确认删除该督办事项?")
+    .then(function () {
+      return delSupervision(supervisionIds);
+    })
+    .then(() => {
+      getList();
+      proxy.$modal.msgSuccess("删除成功");
+    })
+    .catch(() => {});
+}
 function submitSelect() {
   if (ids.value != "" && ids.value != null) {
     proxy.$modal.loading("提交中...");

+ 31 - 17
src/views/offcial/weekly/index.vue

@@ -164,27 +164,33 @@
         align="center"
         class-name="small-padding fixed-width"
       >
-        <template #default="scope" >
-          <el-button v-if="userId==scope.row.userId"
+        <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 v-if="userId==scope.row.userId"
+            >修改</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 v-else
-              link
-              type="primary"
-              icon="view"
-              @click="handleUpdate(scope.row)"
-          >查看</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>
@@ -229,7 +235,11 @@
           <el-input disabled v-model="form.deptName" placeholder="" />
         </el-form-item>
         <el-divider content-position="center">周报事务信息</el-divider>
-        <el-row :gutter="10" class="mb8"  v-if="!form.userId||userId==form.userId">
+        <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
@@ -295,11 +305,15 @@
           </el-table-column>
           <el-table-column align="center" label="下周计划" prop="weekNextPlan">
             <template #default="scope">
+              <!-- scope.row.submitState == 1
+                    ? '此事项本周已完成'
+                    : '请输入下周计划' -->
               <el-input
                 :rows="3"
                 type="textarea"
                 v-model="scope.row.weekNextPlan"
-                placeholder="请输入下周计划"
+                placeholder="请输入下周计划或“此事项本周已完成”
+                "
               />
             </template>
           </el-table-column>
@@ -343,7 +357,7 @@
           </el-table-column> -->
         </el-table>
       </el-form>
-      <template #footer  v-if="!form.userId||userId==form.userId">
+      <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>
@@ -462,10 +476,10 @@ function handleView() {
     );
   });
 }
-huoquUserId()
-function huoquUserId(){
+huoquUserId();
+function huoquUserId() {
   getInfo().then((res) => {
-    userId.value=res.user.userId
+    userId.value = res.user.userId;
   });
 }
 function handleJinzhanYwWeeklyItem() {

+ 1 - 1
vite.config.js

@@ -45,7 +45,7 @@ export default defineConfig(({ mode, command }) => {
         // https://cn.vitejs.dev/config/#server-proxy
         "/dev-api": {
           target: "http://192.168.3.213:8080",
-          // target: "http://192.168.1.220:8080",
+          // target: "http://192.168.1.42:8080",
           changeOrigin: true,
           rewrite: (p) => p.replace(/^\/dev-api/, ""),
         },