daiqisheng %!s(int64=3) %!d(string=hai) anos
pai
achega
c5fe1cd6ef

+ 8 - 3
src/pages/main/performance/components/table.vue

@@ -1,8 +1,8 @@
 <!--
  * @Author       : yuanrunwei
  * @Date         : 2021-11-01 18:02:58
- * @LastEditors  : yuanrunwei
- * @LastEditTime : 2021-12-21 17:41:24
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2021-12-22 19:55:28
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\table.vue
 -->
 <template>
@@ -89,7 +89,8 @@
                         <el-popconfirm
                             v-if="popconfirm"
                             :title="`确定要${label}吗?`"
-                            @confirm="handleClick(props, scope.row)"
+                            @confirm="handleClick(props,scope.row)"
+                            @cancel="handleCancel"
                         >
                             <el-button
                                 slot="reference"
@@ -152,8 +153,12 @@ export default {
             return visible;
         },
         handleClick(props, row) {
+            console.log('aaaaaaaaa')
             this.$emit(props, row);
         },
+        handleCancel(){
+            console.log('我被关闭了')
+        },
         handleModify() {
             this.$emit("modify", this.computed_list);
         },

+ 3 - 2
src/pages/main/performance/department.vue

@@ -34,7 +34,6 @@
         <div class="flex-justify-between padding-right-20 padding-left-20">
           <div>
             <template v-if="edit_visible">
-            
               <el-button
                 type="primary"
                 v-if="edit_form.status === '0'"
@@ -145,7 +144,7 @@ import simpleTable from "./components/table.vue";
 import simplePagination from "./components/pagination.vue";
 import simpleDialog from "./components/dialog.vue";
 // import analysis from "./analysis.vue";
-import sheet from "./components/sheet.vue"
+import sheet from "./components/sheet.vue";
 export default {
   components: {
     simpleForm,
@@ -263,6 +262,8 @@ export default {
         {
           label: "状态",
           props: "status",
+          type:'dictionary',
+          dictionary: {"0":"待处理","1":"待汇总","2":"待审批","3":"已完成"},
         },
       ],
     };

+ 183 - 210
src/pages/main/performance/issue.vue

@@ -7,9 +7,9 @@
         :config="table_config"
         :loading="table_loading"
         :handle-row="table_handle_row"
-        @receiver="handleVisible('receiver')"
+        @principalName="(params) => handleVisible('principalName', params)"
         @detail="handleVisible('template')"
-        @delete="handleDelete"
+        @withdraw="handleWithdraw"
         @edit="handleVisible('template')"
       ></simple-table>
       <simple-pagination
@@ -37,15 +37,16 @@
     </simple-dialog>
     <simple-dialog
       title="回复详情"
-      @cancel="handleVisible('receiver')"
-      @confirm="handleVisible('receiver')"
+      width="700px"
+      @cancel="handleVisible('principalName')"
+      @confirm="handleVisible('principalName')"
       :visible="receiver_visible"
     >
       <simple-table
         :list="receiver_table_list"
         :config="receiver_table_config"
         :loading="receiver_table_loading"
-        @receiver="handleVisible('receiver')"
+        @receiver="handleVisible('principalName')"
       ></simple-table>
     </simple-dialog>
   </div>
@@ -58,146 +59,105 @@ import simpleTable from "./components/table.vue";
 import simpleDialog from "./components/dialog.vue";
 import simplePagination from "./components/pagination.vue";
 export default {
-    components: {
-        analysis,
-        simpleTable,
-        simpleDialog,
-        simpleForm,
-        simplePagination,
-    },
-    data() {
-        return {
-            page: 1,
-            rows: 10,
-            total: 0,
-            template_visible: false,
-            receiver_visible: false,
-            table_loading: false,
-            receiver_table_loading: false,
-            table_search: {},
-            table_form: [
-                {
-                    label: "模板名称",
-                    props: "templateName",
-                    type: "input",
-                },
-                {
-                    label: "截止日期",
-                    props: "endTime",
-                    type: "date",
-                },
-            ],
-            table_list: [],
-            table_handle_row: [
-                {
-                    label: "查看",
-                    props: "detail",
-                },
-                // {
-                //     label: "修改",
-                //     props: "edit",
-                // },
-                {
-                    label: "撤回",
-                    props: "delete",
-                    popconfirm: true,
-                },
-            ],
-            table_config: [
-                {
-                    label: "模板名称",
-                    props: "templateName",
-                },
-                {
-                    label: "填报事由",
-                    props: "reason",
-                },
-                {
-                    label: "填报注意事项",
-                    props: "precautions",
-                },
-                {
-                    label: "截止时间",
-                    props: "date",
-                    type: "endTime",
-                },
-                {
-                    label: "接收人",
-                    props: "principalName",
-                    type: "click",
-                },
-            ],
-            receiver_table_list: [
-                {
-                    receiver: "刘洁",
-                    department: "科室1",
-                    date: "",
-                },
-                {
-                    receiver: "李方岩",
-                    department: "科室2",
-                    date: "",
-                },
-                {
-                    receiver: "吴磊",
-                    department: "科室2",
-                    date: "",
-                },
-                {
-                    receiver: "孙震",
-                    department: "科室2",
-                    date: "",
-                },
-                {
-                    receiver: "赵洪松",
-                    department: "科室2",
-                    date: "",
-                },
-                {
-                    receiver: "孙川",
-                    department: "科室2",
-                    date: "",
-                },
-                {
-                    receiver: "韦琳娜",
-                    department: "科室2",
-                    date: "",
-                },
-                {
-                    receiver: "吴磊",
-                    department: "科室2",
-                    date: "",
-                },
-                {
-                    receiver: "刘洁",
-                    department: "科室1",
-                    date: "",
-                },
-                {
-                    receiver: "刘洁",
-                    department: "科室1",
-                    date: "",
-                },
-            ],
-            receiver_table_config: [
-                {
-                    label: "接收人",
-                    props: "receiver",
-                },
-                {
-                    label: "科室",
-                    props: "department",
-                },
-                {
-                    label: "回复时间",
-                    props: "date",
-                },
-            ],
-        };
-    },
-    methods: {
-        async handleInit(data) {
-        this.$http({
+  components: {
+    analysis,
+    simpleTable,
+    simpleDialog,
+    simpleForm,
+    simplePagination,
+  },
+  data() {
+    return {
+      page: 1,
+      rows: 10,
+      total: 0,
+      template_visible: false,
+      receiver_visible: false,
+      table_loading: false,
+      receiver_table_loading: false,
+      table_search: {},
+      table_form: [
+        {
+          label: "模板名称",
+          props: "templateName",
+          type: "input",
+        },
+        {
+          label: "截止日期",
+          props: "endTime",
+          type: "date",
+        },
+      ],
+      table_list: [],
+      table_handle_row: [
+        {
+          label: "查看",
+          props: "detail",
+        },
+        {
+          label: "修改",
+          props: "edit",
+        },
+        {
+          label: "撤回",
+          props: "withdraw",
+          popconfirm: true,
+        },
+      ],
+      table_config: [
+        {
+          label: "模板名称",
+          props: "templateName",
+        },
+        {
+          label: "填报事由",
+          props: "reason",
+        },
+        {
+          label: "填报注意事项",
+          props: "precautions",
+        },
+        {
+          label: "截止时间",
+          props: "endTime",
+          type: "date",
+        },
+        {
+          label: "接收人",
+          props: "principalName",
+          type: "click",
+        },
+      ],
+      receiver_table_list: [{
+          receiver:'接收人',
+          department:'科室',
+          date:'回复时间',
+          value:'2021.11.4 XXX 同意\n2021.11.4 XXX 同意'
+      }],
+      receiver_table_config: [
+        {
+          label: "接收人",
+          props: "receiver",
+        },
+        {
+          label: "科室",
+          props: "department",
+        },
+        {
+          label: "回复时间",
+          props: "date",
+        },
+        {
+          label: "审批记录",
+          props: "value",
+          type:'textarea'
+        },
+      ],
+    };
+  },
+  methods: {
+    async handleInit(data) {
+      this.$http({
         url: "/CMKIssued/CMKIssuedList",
         method: "post",
         headers: {
@@ -205,74 +165,87 @@ export default {
         },
         data: data,
       }).then((res) => {
-          console.log(res);
-          res.data = this.table_list
+        console.log(res);
+        res.data = this.table_list;
+        this.table_list.push({
+          templateName: "模板名称",
+          precautions: "填报注意事项",
+          reason: "填报事由",
+          endTime: new Date(),
+          principalName: "接收人",
+        });
       });
-            // this.table_loading = true;
-            // const data = [];
-            // let index = 0;
-            // while (index < 1) {
-            //     data.push(
-            //         ...JSON.parse(sessionStorage.getItem("global_data")).filter(
-            //             (element) => element.issue_status
-            //         )
-            //     );
-            //     index = index + 1;
-            // }
-            // this.total = index;
-            // this.table_list = data;
-            // this.table_loading = false;
-        },
-        handleSearch(data) {
-            this.table_search = data;
-            this.handleReset();
-            this.handleInit({...data,page:this.page,pagesize:this.rows});
-        },
-        handleChange(page) {
-            this.page = page;
-            this.handleInit({...this.table_search,page:this.page,pagesize:this.rows});
-        },
-        handleVisible(props) {
-            switch (props) {
-                case "template":
-                    this.template_visible = !this.template_visible;
-                    break;
-                case "receiver":
-                    this.receiver_visible = !this.receiver_visible;
-                    break;
-            }
-        },
-        handleReset() {
-            this.page = 1;
-        },
-        handleDelete() {
-            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();
-        },
+      // this.table_loading = true;
+      // const data = [];
+      // let index = 0;
+      // while (index < 1) {
+      //     data.push(
+      //         ...JSON.parse(sessionStorage.getItem("global_data")).filter(
+      //             (element) => element.issue_status
+      //         )
+      //     );
+      //     index = index + 1;
+      // }
+      // this.total = index;
+      // this.table_list = data;
+      // this.table_loading = false;
     },
-    mounted() {
-         this.handleInit({...this.table_search,page:this.page,pagesize:this.rows});
+    handleSearch(data) {
+      this.table_search = data;
+      this.handleReset();
+      this.handleInit({ ...data, page: this.page, pagesize: this.rows });
+    },
+    handleChange(page) {
+      this.page = page;
+      this.handleInit({
+        ...this.table_search,
+        page: this.page,
+        pagesize: this.rows,
+      });
+    },
+    handleVisible(props, params) {
+      switch (props) {
+        case "template":
+          this.template_visible = !this.template_visible;
+          break;
+        case "principalName":
+          if (params) {
+            console.log(params);
+          }
+          this.receiver_visible = !this.receiver_visible;
+          break;
+      }
+    },
+    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();
     },
+  },
+  mounted() {
+    this.handleInit({
+      ...this.table_search,
+      page: this.page,
+      pagesize: this.rows,
+    });
+  },
 };
 </script>