Browse Source

下发管理文件管理

daiqisheng 3 years ago
parent
commit
49d3e82dbd
2 changed files with 77 additions and 48 deletions
  1. 38 18
      src/pages/main/performance/department.vue
  2. 39 30
      src/pages/main/performance/issue.vue

+ 38 - 18
src/pages/main/performance/department.vue

@@ -262,8 +262,8 @@ export default {
         {
           label: "状态",
           props: "status",
-          type:'dictionary',
-          dictionary: {"0":"待处理","1":"待汇总","2":"待审批","3":"已完成"},
+          type: "dictionary",
+          dictionary: { 0: "待处理", 1: "待汇总", 2: "待审批", 3: "已完成" },
         },
       ],
     };
@@ -295,6 +295,8 @@ export default {
           precautions: "填报注意事项",
           endTime: new Date(),
           loginNameStr: "发起人",
+          id:23,
+          templateContent:'templateContent'
         });
       });
     },
@@ -334,21 +336,22 @@ export default {
       this.track_visible = true;
     },
     handleTransfer() {
-      const object = {
-        ...JSON.parse(sessionStorage.global_data)[0],
-        department_status: "待审批",
-      };
-      sessionStorage.setItem("global_data", JSON.stringify([object]));
-      const process_array = JSON.parse(sessionStorage.global_process);
-      process_array.push({
-        link: "转派工单",
-        creatperson: `ADMIN ${this.$formatDate(new Date(), "YYYY-MM-DD")}`,
-        explain: "",
-      });
-      sessionStorage.setItem("global_process", JSON.stringify(process_array));
-      this.handleInit();
-      this.handleCancel("visible");
-      this.$message.success("转派成功");
+      console.log(this.edit_form, "prams");
+      // const object = {
+      //   ...JSON.parse(sessionStorage.global_data)[0],
+      //   department_status: "待审批",
+      // };
+      // sessionStorage.setItem("global_data", JSON.stringify([object]));
+      // const process_array = JSON.parse(sessionStorage.global_process);
+      // process_array.push({
+      //   link: "转派工单",
+      //   creatperson: `ADMIN ${this.$formatDate(new Date(), "YYYY-MM-DD")}`,
+      //   explain: "",
+      // });
+      // sessionStorage.setItem("global_process", JSON.stringify(process_array));
+      // this.handleInit();
+      // this.handleCancel("visible");
+      // this.$message.success("转派成功");
     },
     handleTurn(type) {
       this.handleCancel("approve_visible");
@@ -410,7 +413,24 @@ export default {
       this.handleCancel("approve_visible");
     },
     handleSubmit() {
-      this.$message.success("提交成功");
+      let reqdata = {
+        id: this.edit_form.id,
+        templateContent: this.edit_form.templateContent,
+      };
+      console.log(reqdata,'reqdata')
+      // 提交好了
+      // this.$http({
+      //   url: "/CMKIssued/CMKIssuedSubmit",
+      //   method: "post",
+      //   headers: {
+      //     "Content-Type": "application/json",
+      //   },
+      //   data: reqdata,
+      // }).then((res) => {
+      //   console.log(res);
+      //   this.$message.success("提交成功");
+      //   this.handleCancel("visible");
+      // });
     },
   },
 };

+ 39 - 30
src/pages/main/performance/issue.vue

@@ -32,7 +32,7 @@
           >
         </div>
       </div>
-      <analysis />
+      <sheet />
       <template v-slot:footer><div></div></template>
     </simple-dialog>
     <simple-dialog
@@ -53,18 +53,20 @@
 </template>
 
 <script>
-import analysis from "./analysis.vue";
+// import analysis from "./analysis.vue";
 import simpleForm from "./components/form.vue";
 import simpleTable from "./components/table.vue";
 import simpleDialog from "./components/dialog.vue";
 import simplePagination from "./components/pagination.vue";
+import sheet from "./components/sheet.vue"
 export default {
   components: {
-    analysis,
+    // analysis,
     simpleTable,
     simpleDialog,
     simpleForm,
     simplePagination,
+    sheet
   },
   data() {
     return {
@@ -128,12 +130,14 @@ export default {
           type: "click",
         },
       ],
-      receiver_table_list: [{
-          receiver:'接收人',
-          department:'科室',
-          date:'回复时间',
-          value:'2021.11.4 XXX 同意\n2021.11.4 XXX 同意'
-      }],
+      receiver_table_list: [
+        {
+          receiver: "接收人",
+          department: "科室",
+          date: "回复时间",
+          value: "2021.11.4 XXX 同意\n2021.11.4 XXX 同意",
+        },
+      ],
       receiver_table_config: [
         {
           label: "接收人",
@@ -150,7 +154,7 @@ export default {
         {
           label: "审批记录",
           props: "value",
-          type:'textarea'
+          type: "textarea",
         },
       ],
     };
@@ -167,13 +171,21 @@ export default {
       }).then((res) => {
         console.log(res);
         res.data = this.table_list;
-        this.table_list.push({
+        this.table_list.push(...[{
+          templateName: "模板名称",
+          precautions: "填报注意事项",
+          reason: "填报事由",
+          endTime: new Date(),
+          id: 23,
+          principalName: "接收人",
+        },{
           templateName: "模板名称",
           precautions: "填报注意事项",
           reason: "填报事由",
           endTime: new Date(),
+          id: 24,
           principalName: "接收人",
-        });
+        }]);
       });
       // this.table_loading = true;
       // const data = [];
@@ -219,24 +231,21 @@ export default {
     handleReset() {
       this.page = 1;
     },
-    handleWithdraw() {
-        console.log('aaaaaaaaaaaaa')
-      const array = [
-        {
-          ...JSON.parse(sessionStorage.global_data)[0],
-          issue_status: 0,
-        },
-      ];
-      sessionStorage.setItem("global_data", JSON.stringify(array));
-      const process_array = JSON.parse(sessionStorage.global_process);
-      process_array.push({
-        link: "撤回工单",
-        creatperson: `ADMIN ${this.$formatDate(new Date(), "YYYY-MM-DD")}`,
-        explain: "",
-      });
-      sessionStorage.setItem("global_process", JSON.stringify(process_array));
-      this.$message.success("撤回成功");
-      this.handleInit();
+    handleWithdraw({ id }) {
+      console.log({ id });
+      // this.$http({
+      //   url: "/CMKIssued/CMKDelIssuedById",
+      //   method: "post",
+      //   headers: {
+      //     "Content-Type": "application/json",
+      //   },
+      //   data: { id },
+      // }).then((res) => {
+      //   if (res) {
+      //     this.$message.success("撤回成功");
+      //     this.handleInit();
+      //   }
+      // });
     },
   },
   mounted() {