ソースを参照

Merge branch 'master' of https://git.agilestar.cn/spfm-group/spfm-market-front

houlf 3 年 前
コミット
2d322fc5f3

+ 13 - 4
src/pages/main/performance/components/table.vue

@@ -1,15 +1,16 @@
 <!--
  * @Author       : yuanrunwei
  * @Date         : 2021-11-01 18:02:58
- * @LastEditors  : yuanrunwei
- * @LastEditTime : 2021-12-06 19:51:14
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2021-12-22 19:55:28
  * @FilePath     : \spfm-market-front\src\pages\main\performance\components\table.vue
 -->
 <template>
     <el-table class="simple-table" :data="computed_list" v-loading="loading">
         <el-table-column
             v-for="(
-                { props, label, type, width, align, children }, index
+                { props, label, type, width, align, children, dictionary },
+                index
             ) in config"
             :key="index"
             :prop="props"
@@ -41,6 +42,9 @@
                         {{ scope.row[props] }}
                     </div>
                 </div>
+                <div v-else-if="type === 'dictionary'">
+                    {{ dictionary[scope.row[props]] }}
+                </div>
                 <div v-else>{{ scope.row[props] }}</div>
             </template>
             <template v-if="children">
@@ -85,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"
@@ -148,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);
         },

+ 387 - 404
src/pages/main/performance/department.vue

@@ -1,159 +1,141 @@
 <template>
-    <div>
-        <div class="simple-container">
-            <simple-form :form="table_form" @search="handleSearch">
-                <!-- :handle="table_handle"
+  <div>
+    <div class="simple-container">
+      <simple-form :form="table_form" @search="handleSearch">
+        <!-- :handle="table_handle"
       @add="handleRulesVisible"
       @class="handleDrawer('class')"
       @download="handleDownload" -->
-            </simple-form>
-            <simple-table
-                :list="table_list"
-                :config="table_config"
-                :loading="table_loading"
-                :handle-row="table_handle_row"
-                @check="handleCheck"
-                @edit="handleEdit"
-            ></simple-table>
-            <simple-pagination
-                :page="page"
-                :total="total"
-                @change="handleChange"
-            ></simple-pagination>
-        </div>
-        <simple-dialog
-            fullscreen
-            title="部门绩效"
-            :visible="visible"
-            :reload="reload"
-            width="1200px"
-            @cancel="handleCancel('visible')"
-        >
-            <template>
-                <!-- 按钮部分 -->
-                <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.department_status === '待处理'"
-                                @click="handleTransfer"
-                                >转派</el-button
-                            >
-                            <el-button
-                                type="primary"
-                                v-if="edit_form.department_status === '待处理'"
-                                @click="handleSubmit"
-                                >提交</el-button
-                            >
-                            <el-button
-                                type="primary"
-                                v-if="edit_form.department_status === '待审批'"
-                                @click="handleApprove"
-                                >审批</el-button
-                            >
-                        </template>
-                        <el-button type="primary" @click="handleTrack"
-                            >流程跟踪</el-button
-                        >
-                        <el-button type="primary">导出</el-button>
-                    </div>
-                    <div>
-                        <el-button
-                            @click="handleCancel('visible')"
-                            type="primary"
-                            >返回</el-button
-                        >
-                    </div>
-                </div>
-                <!-- 主体部分 -->
-                <analysis
-                    :edit="
-                        edit_form.department_status === '待处理' && edit_visible
-                    "
-                />
+      </simple-form>
+      <simple-table
+        :list="table_list"
+        :config="table_config"
+        :loading="table_loading"
+        :handle-row="table_handle_row"
+        @check="handleCheck"
+        @edit="handleEdit"
+      ></simple-table>
+      <simple-pagination
+        :page="page"
+        :total="total"
+        @change="handleChange"
+      ></simple-pagination>
+    </div>
+    <simple-dialog
+      fullscreen
+      title="文件收集"
+      :visible="visible"
+      :reload="reload"
+      width="1200px"
+      @cancel="handleCancel('visible')"
+    >
+      <template>
+        <!-- 按钮部分 -->
+        <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'"
+                @click="handleTransfer"
+                >转派</el-button
+              >
+              <el-button
+                type="primary"
+                v-if="edit_form.status === '0'"
+                @click="handleSubmit"
+                >提交</el-button
+              >
+              <el-button
+                type="primary"
+                v-if="edit_form.status === '2'"
+                @click="handleApprove"
+                >审批</el-button
+              >
             </template>
-            <template v-slot:footer><div></div></template>
-        </simple-dialog>
-        <simple-dialog
-            title="审批"
-            :visible="approve_visible"
-            :reload="reload"
-            width="500px"
-            props="approve_visible"
-            @cancel="handleCancel('approve_visible')"
+            <el-button type="primary" @click="handleTrack">流程跟踪</el-button>
+            <el-button type="primary">导出</el-button>
+          </div>
+          <div>
+            <el-button @click="handleCancel('visible')" type="primary"
+              >返回</el-button
+            >
+          </div>
+        </div>
+        <!-- 主体部分 -->
+        <sheet />
+        <!-- <analysis
+          :edit="edit_form.department_status === '待处理' && edit_visible"
+        /> -->
+      </template>
+      <template v-slot:footer><div></div></template>
+    </simple-dialog>
+    <simple-dialog
+      title="审批"
+      :visible="approve_visible"
+      :reload="reload"
+      width="500px"
+      props="approve_visible"
+      @cancel="handleCancel('approve_visible')"
+    >
+      <el-form :model="approveForm" ref="approveForm"
+        ><el-form-item label="审批意见" prop="comments" label-width="80px"
+          ><el-input
+            type="textarea"
+            v-model="approveForm.comments"
+            autosize /></el-form-item
+      ></el-form>
+      <template v-slot:footer
+        ><div>
+          <div v-if="type === '1'">
+            <el-button @click="handleCancel('approve_visible')">结束</el-button>
+            <el-button @click="handleTurn(type)" type="primary"
+              >转副总审批</el-button
+            >
+          </div>
+          <div v-else-if="type === '2'">
+            <el-button @click="handleCancel('approve_visible')">结束</el-button>
+            <el-button @click="handleCancel('approve_visible')">打回</el-button>
+            <el-button @click="handleTurn(type)" type="primary"
+              >转总经理审批</el-button
+            >
+          </div>
+          <div v-else>
+            <el-button @click="handleBack">打回</el-button>
+            <el-button @click="handleAgree" type="primary">同意</el-button>
+          </div>
+        </div>
+      </template>
+    </simple-dialog>
+    <simple-dialog
+      title="流程跟踪"
+      :visible="track_visible"
+      :reload="reload"
+      width="600px"
+      props="track_visible"
+      @confirm="handleConfirm"
+      @cancel="handleCancel('track_visible')"
+    >
+      <el-table :data="trackList" border>
+        <el-table-column
+          prop="link"
+          label="流程环节"
+          align="center"
+          width="180"
         >
-            <el-form :model="approveForm" ref="approveForm"
-                ><el-form-item
-                    label="审批意见"
-                    prop="comments"
-                    label-width="80px"
-                    ><el-input
-                        type="textarea"
-                        v-model="approveForm.comments"
-                        autosize /></el-form-item
-            ></el-form>
-            <template v-slot:footer
-                ><div>
-                    <div v-if="type === '1'">
-                        <el-button @click="handleCancel('approve_visible')"
-                            >结束</el-button
-                        >
-                        <el-button @click="handleTurn(type)" type="primary"
-                            >转副总审批</el-button
-                        >
-                    </div>
-                    <div v-else-if="type === '2'">
-                        <el-button @click="handleCancel('approve_visible')"
-                            >结束</el-button
-                        >
-                        <el-button @click="handleCancel('approve_visible')"
-                            >打回</el-button
-                        >
-                        <el-button @click="handleTurn(type)" type="primary"
-                            >转总经理审批</el-button
-                        >
-                    </div>
-                    <div v-else>
-                        <el-button @click="handleBack">打回</el-button>
-                        <el-button @click="handleAgree" type="primary"
-                            >同意</el-button
-                        >
-                    </div>
-                </div>
-            </template>
-        </simple-dialog>
-        <simple-dialog
-            title="流程跟踪"
-            :visible="track_visible"
-            :reload="reload"
-            width="600px"
-            props="track_visible"
-            @confirm="handleConfirm"
-            @cancel="handleCancel('track_visible')"
+        </el-table-column>
+        <el-table-column
+          prop="creatperson"
+          label="处理人"
+          align="center"
+          width="180"
         >
-            <el-table :data="trackList" border>
-                <el-table-column
-                    prop="link"
-                    label="流程环节"
-                    align="center"
-                    width="180"
-                >
-                </el-table-column>
-                <el-table-column
-                    prop="creatperson"
-                    label="处理人"
-                    align="center"
-                    width="180"
-                >
-                </el-table-column>
-                <el-table-column prop="explain" label="审批说明" align="center">
-                </el-table-column>
-            </el-table>
-        </simple-dialog>
-    </div>
+        </el-table-column>
+        <el-table-column prop="explain" label="审批说明" align="center">
+        </el-table-column>
+      </el-table>
+    </simple-dialog>
+  </div>
 </template>
 
 <script>
@@ -161,275 +143,276 @@ import simpleForm from "./components/form.vue";
 import simpleTable from "./components/table.vue";
 import simplePagination from "./components/pagination.vue";
 import simpleDialog from "./components/dialog.vue";
-import analysis from "./analysis.vue";
+// import analysis from "./analysis.vue";
+import sheet from "./components/sheet.vue";
 export default {
-    components: {
-        simpleForm,
-        simpleTable,
-        simplePagination,
-        simpleDialog,
-        analysis,
-    },
-    data() {
-        return {
-            page: 1,
-            total: 5,
-            //   dialog 参数
-            visible: false,
-            edit_visible: false,
-            approve_visible: false,
-            track_visible: false,
-            edit_form: {},
-            reload: 0,
-            // 判断类型
-            type: "3",
-            approverules: {
-                comments: [
-                    {
-                        required: true,
-                        message: "请输入审批意见",
-                        trigger: "blur",
-                    },
-                ],
-            },
-            // 审批意见
-            approveForm: { comments: "" },
-            trackList: [],
-            //   顶部form
-            table_form: [
-                {
-                    label: "绩效分类",
-                    props: "department",
-                    type: "select",
-                    dictionary: [
-                        {
-                            label: "GS",
-                            value: "1",
-                        },
-                        {
-                            label: "KPI",
-                            value: "2",
-                        },
-                    ],
-                },
-                {
-                    label: "下发月份",
-                    props: "month",
-                    type: "month",
-                },
-                {
-                    label: "状态",
-                    props: "service",
-                    type: "select",
-                    dictionary: [
-                        {
-                            label: "待处理",
-                            value: "1",
-                        },
-                        {
-                            label: "待汇总",
-                            value: "2",
-                        },
-                        {
-                            label: "待审批",
-                            value: "3",
-                        },
-                        {
-                            label: "已完成",
-                            value: "4",
-                        },
-                    ],
-                },
-            ],
-            //   列表数据
-            table_list: [],
-            table_loading: false,
-            //   表格里的操作按钮
-            table_handle_row: [
-                {
-                    label: "查看",
-                    props: "check",
-                },
-                {
-                    label: "处理",
-                    props: "edit",
-                    visible: {
-                        department_status: ["待处理", "待审批"],
-                    },
-                },
-            ],
-            //  表头配置
-            table_config: [
-                {
-                    label: "绩效分类",
-                    props: "performance_type",
-                },
-                {
-                    label: "模板名称",
-                    props: "template_name",
-                },
-                {
-                    label: "填报事由",
-                    props: "reason",
-                },
-                {
-                    label: "填报注意事项",
-                    props: "note",
-                },
-                {
-                    label: "截止时间",
-                    props: "date",
-                    type: "date",
-                },
-                {
-                    label: "发起人",
-                    props: "template_number",
-                },
-                {
-                    label: "状态",
-                    props: "department_status",
-                },
-            ],
-        };
-    },
-    mounted() {
-        this.handleInit();
-    },
-    methods: {
-        //   初始化
-        handleInit() {
-            this.trackList = JSON.parse(sessionStorage.global_process);
-            this.table_list = JSON.parse(sessionStorage.global_data).filter(
-                (element) => element.issue_status
-            );
-        },
-        handleChange(page) {
-            this.page = page;
-            this.handleInit();
+  components: {
+    simpleForm,
+    simpleTable,
+    simplePagination,
+    simpleDialog,
+    // analysis,
+    sheet,
+  },
+  data() {
+    return {
+      page: 1,
+      rows: 10,
+      total: 5,
+      //   搜索参数
+      table_search: {},
+      //   dialog 参数
+      visible: false,
+      edit_visible: false,
+      approve_visible: false,
+      track_visible: false,
+      edit_form: {},
+      reload: 0,
+      // 判断类型
+      type: "3",
+      approverules: {
+        comments: [
+          {
+            required: true,
+            message: "请输入审批意见",
+            trigger: "blur",
+          },
+        ],
+      },
+      // 审批意见
+      approveForm: { comments: "" },
+      trackList: [],
+      //   顶部form
+      table_form: [
+        {
+          label: "模板名称",
+          props: "name",
+          type: "input",
         },
-        // 搜索事件
-        handleSearch(data) {
-            console.log(data);
+        {
+          label: "下发月份",
+          props: "issuedDate",
+          type: "month",
         },
-        // 编辑按钮
-        handleEdit(row) {
-            console.log(row, "row");
-            this.visible = true;
-            this.edit_visible = true;
-            this.edit_form = row;
-        },
-        handleCheck(row) {
-            console.log(row, "row");
-            this.visible = true;
-            this.edit_visible = false;
+        {
+          label: "状态",
+          props: "status",
+          type: "select",
+          // 0.待处理  1.待汇总 2.待审批  3.已完成
+          dictionary: [
+            {
+              label: "待处理",
+              value: "0",
+            },
+            {
+              label: "待汇总",
+              value: "1",
+            },
+            {
+              label: "待审批",
+              value: "2",
+            },
+            {
+              label: "已完成",
+              value: "3",
+            },
+          ],
         },
-        handleDelete() {},
-        // dialog事件
-        //权限管理事件
-        handleApprove() {
-            this.approve_visible = true;
+      ],
+      //   列表数据
+      table_list: [],
+      table_loading: false,
+      //   表格里的操作按钮
+      table_handle_row: [
+        {
+          label: "查看",
+          props: "check",
         },
-        handleTrack() {
-            this.track_visible = true;
+        {
+          label: "处理",
+          props: "edit",
+          visible: {
+            status: ["0", "2"],
+          },
         },
-        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("转派成功");
+      ],
+      //  表头配置
+      table_config: [
+        {
+          label: "模板名称",
+          props: "templateName",
         },
-        handleTurn(type) {
-            this.handleCancel("approve_visible");
-            console.log(type);
+        {
+          label: "填报事由",
+          props: "reason",
         },
-        handleConfirm(visible) {
-            console.log(visible);
-            this.track_visible = visible;
+        {
+          label: "填报注意事项",
+          props: "precautions",
         },
-        // 关闭方法
-        handleCancel(data) {
-            switch (data) {
-                case "visible":
-                    this.visible = false;
-                    break;
-                case "approve_visible":
-                    this.approveForm.comments = "";
-                    this.approve_visible = false;
-                    break;
-                case "track_visible":
-                    this.track_visible = false;
-                    break;
-            }
+        {
+          label: "截止时间",
+          props: "endTime",
+          type: "date",
         },
-        handleBack() {
-            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: this.approveForm.comments,
-            });
-            sessionStorage.setItem(
-                "global_process",
-                JSON.stringify(process_array)
-            );
-            this.handleInit();
-            this.$message.success("打回成功");
-            this.handleCancel("visible");
-            this.handleCancel("approve_visible");
+        {
+          label: "发起人",
+          props: "loginNameStr",
         },
-        handleAgree() {
-            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: this.approveForm.comments,
-            });
-            sessionStorage.setItem(
-                "global_process",
-                JSON.stringify(process_array)
-            );
-            this.handleInit();
-            this.$message.success("审批成功");
-            this.handleCancel("visible");
-            this.handleCancel("approve_visible");
+        {
+          label: "状态",
+          props: "status",
+          type:'dictionary',
+          dictionary: {"0":"待处理","1":"待汇总","2":"待审批","3":"已完成"},
         },
-        handleSubmit() {
-            this.$message.success("提交成功");
+      ],
+    };
+  },
+  mounted() {
+    this.handleInit({
+      ...this.table_search,
+      page: this.page,
+      pagesize: this.rows,
+    });
+  },
+  methods: {
+    //   初始化
+    handleInit(data) {
+      this.$http({
+        url: "/CMKIssued/CMKIssuedListByUser",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
         },
+        data: data,
+      }).then((res) => {
+        console.log(res);
+        res.data = this.table_list;
+        this.table_list.push({
+          templateName: "模板名称",
+          status: "0",
+          reason: "填报事由",
+          precautions: "填报注意事项",
+          endTime: new Date(),
+          loginNameStr: "发起人",
+        });
+      });
+    },
+    handleChange(page) {
+      this.page = page;
+      this.handleInit({
+        ...this.table_search,
+        page: this.page,
+        pagesize: this.rows,
+      });
+    },
+    // 搜索事件
+    handleSearch(data) {
+      this.table_search = data;
+      this.page = 1;
+      this.handleInit({ ...data, page: this.page, pagesize: this.rows });
+    },
+    // 编辑按钮
+    handleEdit(row) {
+      console.log(row, "row");
+      this.visible = true;
+      this.edit_visible = true;
+      this.edit_form = row;
+    },
+    handleCheck(row) {
+      console.log(row, "row");
+      this.visible = true;
+      this.edit_visible = false;
+    },
+    handleDelete() {},
+    // dialog事件
+    //权限管理事件
+    handleApprove() {
+      this.approve_visible = true;
+    },
+    handleTrack() {
+      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("转派成功");
+    },
+    handleTurn(type) {
+      this.handleCancel("approve_visible");
+      console.log(type);
+    },
+    handleConfirm(visible) {
+      console.log(visible);
+      this.track_visible = visible;
+    },
+    // 关闭方法
+    handleCancel(data) {
+      switch (data) {
+        case "visible":
+          this.visible = false;
+          break;
+        case "approve_visible":
+          this.approveForm.comments = "";
+          this.approve_visible = false;
+          break;
+        case "track_visible":
+          this.track_visible = false;
+          break;
+      }
+    },
+    handleBack() {
+      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: this.approveForm.comments,
+      });
+      sessionStorage.setItem("global_process", JSON.stringify(process_array));
+      this.handleInit();
+      this.$message.success("打回成功");
+      this.handleCancel("visible");
+      this.handleCancel("approve_visible");
+    },
+    handleAgree() {
+      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: this.approveForm.comments,
+      });
+      sessionStorage.setItem("global_process", JSON.stringify(process_array));
+      this.handleInit();
+      this.$message.success("审批成功");
+      this.handleCancel("visible");
+      this.handleCancel("approve_visible");
+    },
+    handleSubmit() {
+      this.$message.success("提交成功");
     },
+  },
 };
 </script>
 

+ 1 - 1
src/pages/main/performance/index.vue

@@ -40,7 +40,7 @@ export default {
             name: "department",
             routes: [
                 {
-                    label: "部门绩效",
+                    label: "文件收集",
                     name: "department",
                 },
                 {

+ 229 - 264
src/pages/main/performance/issue.vue

@@ -1,59 +1,55 @@
 <template>
-    <div>
-        <div class="simple-container">
-            <simple-form
-                :form="table_form"
-                @search="handleSearch"
-            ></simple-form>
-            <simple-table
-                :list="table_list"
-                :config="table_config"
-                :loading="table_loading"
-                :handle-row="table_handle_row"
-                @receiver="handleVisible('receiver')"
-                @detail="handleVisible('template')"
-                @delete="handleDelete"
-                @edit="handleVisible('template')"
-            ></simple-table>
-            <simple-pagination
-                :page="page"
-                :total="total"
-                @change="handleChange"
-            ></simple-pagination>
-        </div>
-        <simple-dialog
-            title="查看"
-            fullscreen
-            @cancel="handleVisible('template')"
-            @confirm="handleVisible('template')"
-            :visible="template_visible"
-            ><div
-                class="flex-justify-align-end padding-right-20 padding-left-20"
-            >
-                <div>
-                    <el-button type="primary">导出</el-button>
-                    <el-button @click="handleVisible('template')" type="primary"
-                        >返回</el-button
-                    >
-                </div>
-            </div>
-            <analysis />
-            <template v-slot:footer><div></div></template>
-        </simple-dialog>
-        <simple-dialog
-            title="回复详情"
-            @cancel="handleVisible('receiver')"
-            @confirm="handleVisible('receiver')"
-            :visible="receiver_visible"
-        >
-            <simple-table
-                :list="receiver_table_list"
-                :config="receiver_table_config"
-                :loading="receiver_table_loading"
-                @receiver="handleVisible('receiver')"
-            ></simple-table>
-        </simple-dialog>
+  <div>
+    <div class="simple-container">
+      <simple-form :form="table_form" @search="handleSearch"></simple-form>
+      <simple-table
+        :list="table_list"
+        :config="table_config"
+        :loading="table_loading"
+        :handle-row="table_handle_row"
+        @principalName="(params) => handleVisible('principalName', params)"
+        @detail="handleVisible('template')"
+        @withdraw="handleWithdraw"
+        @edit="handleVisible('template')"
+      ></simple-table>
+      <simple-pagination
+        :page="page"
+        :total="total"
+        @change="handleChange"
+      ></simple-pagination>
     </div>
+    <simple-dialog
+      title="查看"
+      fullscreen
+      @cancel="handleVisible('template')"
+      @confirm="handleVisible('template')"
+      :visible="template_visible"
+      ><div class="flex-justify-align-end padding-right-20 padding-left-20">
+        <div>
+          <el-button type="primary">导出</el-button>
+          <el-button @click="handleVisible('template')" type="primary"
+            >返回</el-button
+          >
+        </div>
+      </div>
+      <analysis />
+      <template v-slot:footer><div></div></template>
+    </simple-dialog>
+    <simple-dialog
+      title="回复详情"
+      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('principalName')"
+      ></simple-table>
+    </simple-dialog>
+  </div>
 </template>
 
 <script>
@@ -63,224 +59,193 @@ 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: "template_name",
-                    type: "select",
-                    dictionary: [
-                        {
-                            label: "GS",
-                            value: "GS",
-                        },
-                        {
-                            label: "KPI",
-                            value: "KPI",
-                        },
-                    ],
-                },
-                {
-                    label: "截止日期",
-                    props: "date",
-                    type: "date",
-                },
-            ],
-            table_list: [],
-            table_handle_row: [
-                {
-                    label: "查看",
-                    props: "detail",
-                },
-                // {
-                //     label: "修改",
-                //     props: "edit",
-                // },
-                {
-                    label: "撤回",
-                    props: "delete",
-                    popconfirm: true,
-                },
-            ],
-            table_config: [
-                {
-                    label: "绩效类型",
-                    props: "performance_type",
-                },
-                {
-                    label: "模板名称",
-                    props: "template_name",
-                },
-                {
-                    label: "填报事由",
-                    props: "reason",
-                },
-                {
-                    label: "填报注意事项",
-                    props: "note",
-                },
-                {
-                    label: "截止时间",
-                    props: "date",
-                    type: "date",
-                },
-                {
-                    label: "接收人",
-                    props: "receiver",
-                    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() {
-            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;
+  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",
         },
-        handleSearch({ template_name }) {
-            this.table_search = { template_name };
-            this.handleReset();
-            this.handleInit();
+        {
+          label: "填报事由",
+          props: "reason",
         },
-        handleChange(page) {
-            this.page = page;
-            this.handleInit();
+        {
+          label: "填报注意事项",
+          props: "precautions",
         },
-        handleVisible(props) {
-            switch (props) {
-                case "template":
-                    this.template_visible = !this.template_visible;
-                    break;
-                case "receiver":
-                    this.receiver_visible = !this.receiver_visible;
-                    break;
-            }
+        {
+          label: "截止时间",
+          props: "endTime",
+          type: "date",
         },
-        handleReset() {
-            this.page = 1;
+        {
+          label: "接收人",
+          props: "principalName",
+          type: "click",
         },
-        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();
+      ],
+      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: {
+          "Content-Type": "application/json",
+        },
+        data: data,
+      }).then((res) => {
+        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 });
     },
-    mounted() {
-        this.handleInit();
+    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>