Selaa lähdekoodia

体系运行记录上传修改按钮

shenqilong 11 kuukautta sitten
vanhempi
sitoutus
34da05be45
1 muutettua tiedostoa jossa 348 lisäystä ja 313 poistoa
  1. 348 313
      src/views/platform/bpmn/bpmInstHis/oldFilesUploadList.vue

+ 348 - 313
src/views/platform/bpmn/bpmInstHis/oldFilesUploadList.vue

@@ -13,13 +13,15 @@
         </div>
         <ibps-crud
             ref="crud"
+            v-loading="loadingEdit"
             :style="{ marginLeft: width + 'px' }"
             :height="height"
             :data="listData"
+            :row-handle=" $route.name=='wjkzgl-ywyxjlsc'? listConfig.rowHandle:null"
             :toolbars="listConfig.toolbars"
             :search-form="listConfig.searchForm"
             :pk-key="pkKey"
-            :displayField="tableTitle"
+            :display-field="tableTitle"
             :columns="listConfig.columns"
             :loading="loading"
             :index-row="false"
@@ -45,9 +47,19 @@
             :def-id="defId"
             :pk-value="pkValue"
             :form-key="formKey"
-            :addDataCont="addDataCont"
+            :add-data-cont="addDataCont"
             @close="(visible) => (dialogFormVisible = visible)"
         />
+        <data-template-formrender-dialog
+            :loading="loading"
+            :visible="editDialogVisible"
+            :form-key="formKey"
+            :pk-value="editPkValue"
+            :toolbars="editToolbars"
+            :readonly="false"
+            :add-data-cont="addDataCont"
+            @close="editClose"
+        />
 
         <el-dialog
             :close-on-click-modal="false"
@@ -71,63 +83,66 @@
 </template>
 
 <script>
-import ActionUtils from "@/utils/action";
-import IbpsTypeTree from "@/business/platform/cat/type/tree";
-import FixHeight from "@/mixins/height";
-import BpmnFormrender from "@/business/platform/bpmn/form/dialog";
-import curdPost from "@/business/platform/form/utils/custom/joinCURD.js"; //增删改查规则
-import IbpsAttachment from "@/business/platform/file/attachment/selector";
-import GetReport from "./corresponding/getReport.js";
-import { downloadFile } from "@/business/platform/file/utils";
+import ActionUtils from '@/utils/action'
+import IbpsTypeTree from '@/business/platform/cat/type/tree'
+import FixHeight from '@/mixins/height'
+import BpmnFormrender from '@/business/platform/bpmn/form/dialog'
+import curdPost from '@/business/platform/form/utils/custom/joinCURD.js' // 增删改查规则
+import IbpsAttachment from '@/business/platform/file/attachment/selector'
+import GetReport from './corresponding/getReport.js'
+import { downloadFile } from '@/business/platform/file/utils'
+import DataTemplateFormrenderDialog from '@/business/platform/data/templaterender/form/dialog.vue'
 
 export default {
     components: {
         IbpsTypeTree,
         BpmnFormrender,
-        "ibps-attachment": IbpsAttachment,
+        DataTemplateFormrenderDialog,
+        'ibps-attachment': IbpsAttachment
     },
     mixins: [FixHeight, GetReport],
     props: {
         location: {
             type: String,
-            default: "initial",
-        },
+            default: 'initial'
+        }
     },
-    data() {
-        const { role } = this.$store.getters.userInfo;
-        const roleKey = ["xtgljs", "syszr", "dagly", "xxgljs"];
-        var fileDownloadAuthority = false;
+    data () {
+        const { role } = this.$store.getters.userInfo
+        const roleKey = ['xtgljs', 'syszr', 'dagly', 'xxgljs']
+        var fileDownloadAuthority = false
         for (const i of roleKey) {
             if (
                 role.some((so) => {
-                    return so.alias === i;
+                    return so.alias === i
                 })
             ) {
-                fileDownloadAuthority = true;
-                break;
+                fileDownloadAuthority = true
+                break
             }
         }
         return {
             width: 200,
             selection: false,
             dialogFormVisible: false, // 弹窗
-            defId: "", // 添加dialog需要使用
+            defId: '', // 添加dialog需要使用
             addDataCont: {},
-            pkKey: "id_", // 主键  如果主键不是pk需要传主键
-            formKey: "ywyxjl", // 编辑dialog需要使用
-            pkValue: "",
-            templateKey: "ywyxjlsc",
-            tableTitle: "",
-            typeId: "",
-            listType: "",
-            srcUrl: "", //报表字段
-            fuJian: "", //文件字段
-            isDisable: false, //判断多次点击
-            forClick: "", //判断是否重复点击
+            pkKey: 'id_', // 主键  如果主键不是pk需要传主键
+            formKey: 'ywyxjl', // 编辑dialog需要使用
+            pkValue: '',
+            templateKey: 'ywyxjlsc',
+            tableTitle: '',
+            typeId: '',
+            listType: '',
+            srcUrl: '', // 报表字段
+            fuJian: '', // 文件字段
+            isDisable: false, // 判断多次点击
+            forClick: '', // 判断是否重复点击
             visible: false,
             currReportCont: {},
-            title: "",
+            title: '',
             loading: true,
+            loadingEdit: false,
             height: document.clientHeight,
             reportAll: [],
             listData: [],
@@ -137,292 +152,309 @@ export default {
                     limit: 0,
                     page: 0,
                     totalCount: 0,
-                    totalPages: 0,
-                },
+                    totalPages: 0
+                }
             },
             selectListData: [],
             pagination: {
                 limit: 20,
-                page: 1,
+                page: 1
             },
             paginations: 20,
             page: 1,
-            sorts: { NIAN_DU_: "desc" },
-            depth: "", // 分类栏层级
+            sorts: { NIAN_DU_: 'desc' },
+            depth: '', // 分类栏层级
             treeData: [], // 分类栏数据
-            guanJian: "",
-            niandu: "", // 年度
-            startTime: "", // 开始时间
-            endTime: "", // 结束时间
+            guanJian: '',
+            niandu: '', // 年度
+            startTime: '', // 开始时间
+            endTime: '', // 结束时间
             listOptions: {
                 border: true,
-                stripe: true,
+                stripe: true
             },
             listConfig: {
                 toolbars: [
-                    { key: "search" },
+                    { key: 'search' }
                     // { key: 'add' },
                     // { key: 'detail' },
                     // { key: 'resetSearch' }
                 ],
+                rowHandle: {
+                    effect: 'display',
+                    actions: [
+                        { key: 'edit', label: '编辑', type: 'primary', icon: 'ibps-icon-edit' }
+
+                    ]
+                },
                 searchForm: {
                     forms: [
-                        { prop: "guanJian", label: "关键字:", width: 50 },
-                        { prop: "nianDu", label: "年度:", width: 50 },
+                        { prop: 'guanJian', label: '关键字:', width: 50 },
+                        { prop: 'nianDu', label: '年度:', width: 50 },
                         {
-                            prop: "bianZhiShiJian",
-                            label: "上传时间:",
-                            fieldType: "daterange",
-                            width: 225,
-                        },
-                    ],
+                            prop: 'bianZhiShiJian',
+                            label: '上传时间:',
+                            fieldType: 'daterange',
+                            width: 225
+                        }
+                    ]
                 },
                 // 表格字段配置
                 columns: [
                     {
-                        prop: "nian_du_",
-                        label: "年度",
+                        prop: 'nian_du_',
+                        label: '年度',
                         width: 50,
-                        dateFormat: "yyyy",
-                        sortable: "custom",
+                        dateFormat: 'yyyy',
+                        sortable: 'custom'
                     },
-                    { prop: "fen_lei_", label: "记录表单分类", width: 120 },
+                    { prop: 'fen_lei_', label: '记录表单分类', width: 120 },
                     {
-                        prop: "biao_dan_ming_che",
-                        label: "表单名称",
-                        width: 150,
+                        prop: 'biao_dan_ming_che',
+                        label: '表单名称',
+                        width: 150
                     },
                     {
-                        prop: "shi_wu_shuo_ming_",
-                        label: "事务说明",
-                        width: 300,
+                        prop: 'shi_wu_shuo_ming_',
+                        label: '事务说明',
+                        width: 300
                     },
 
                     {
-                        prop: "bian_zhi_shi_jian",
-                        label: "上传时间",
-                        width: 100,
+                        prop: 'bian_zhi_shi_jian',
+                        label: '上传时间',
+                        width: 100
                     },
                     //   { prop: 'bm_name', label: '上传部门', width: 120 },
-                    { prop: "ry_name", label: "上传人", width: 80 },
+                    { prop: 'ry_name', label: '上传人', width: 80 },
                     {
-                        prop: "fu_jian_",
-                        label: "附件",
-                        slotName: "wenjinachayue",
-                        width: 300,
-                    },
-                ],
+                        prop: 'fu_jian_',
+                        label: '附件',
+                        slotName: 'wenjinachayue',
+                        width: 300
+                    }
+                ]
             },
-            fileDownloadAuthority
-        };
+            fileDownloadAuthority,
+            editDialogVisible: false,
+            editPkValue: '',
+            editToolbars: [{
+                button_type: 'close',
+                label: '关闭',
+                key: 'close'
+            },
+            {
+                button_type: 'save',
+                label: '保存',
+                key: 'save'
+            }]
+        }
     },
-    created() {
-        this.loadData();
+    created () {
+        this.loadData()
         // this.getConfig() //获取配置的报表
-        let roleArr = this.$store.getters.userInfo.role;
-        let pageName = this.$route.name;
+        const roleArr = this.$store.getters.userInfo.role
+        const pageName = this.$route.name
         const isSuper = roleArr.some((so) => {
-            return so.name == "系统管理角色";
-        });
+            return so.name == '系统管理角色'
+        })
         const isTrue = roleArr.some((so) => {
             return (
-                so.name == "系统管理角色" ||
-                so.name == "实验室主任" ||
-                so.name == "档案管理员"
-            );
-        });
-        if (isSuper && pageName == "wjkzgl-ywyxjlsc") {
-            this.listConfig.toolbars.push({ key: "remove" });
+                so.name == '系统管理角色' ||
+                so.name == '实验室主任' ||
+                so.name == '档案管理员'
+            )
+        })
+        if (isSuper && pageName == 'wjkzgl-ywyxjlsc') {
+            this.listConfig.toolbars.push({ key: 'remove' })
             // this.listConfig.toolbars.push({ key: 'edit' })
-            this.selection = true;
+            this.selection = true
         }
 
         if (isTrue) {
-            this.listConfig.toolbars.push({ key: "export" });
-            this.selection = true;
+            this.listConfig.toolbars.push({ key: 'export' })
+            this.selection = true
         }
     },
     methods: {
-        /*获取配置报表数据*/
-        getConfig() {
+        /* 获取配置报表数据*/
+        getConfig () {
             curdPost(
-                "select",
-                this.packNameWhere("t_lcidglbdbb", { 1: "1" })
+                'select',
+                this.packNameWhere('t_lcidglbdbb', { 1: '1' })
             ).then((response) => {
-                this.reportAll = response.variables.data;
-            });
+                this.reportAll = response.variables.data
+            })
         },
         /* 封装表名与条件*/
-        packNameWhere(name, where) {
-            let cont = {};
-            cont["tableName"] = name;
-            cont["paramWhere"] = where;
-            return cont;
+        packNameWhere (name, where) {
+            const cont = {}
+            cont['tableName'] = name
+            cont['paramWhere'] = where
+            return cont
         },
-        openTask(id) {
-            this.dialogFormVisible = true;
-            this.defId = id;
+        openTask (id) {
+            this.dialogFormVisible = true
+            this.defId = id
             this.addDataCont = {
                 fenLei: this.tableTitle,
-                fenLeiId: this.typeId,
-            };
+                fenLeiId: this.typeId
+            }
         },
         // 加载数据
-        loadData() {
-            this.loading = true;
-            let typeWheres = [];
-            let typeWhere = "";
-            let startTimeWhere = this.startTime
+        async loadData () {
+            this.loading = true
+            const typeWheres = []
+            let typeWhere = ''
+            const startTimeWhere = this.startTime
                 ? this.endTime
                     ? ` bian_zhi_shi_jian between '${this.startTime}' and '${this.endTime}'`
                     : ` bian_zhi_shi_jian between '${this.startTime}' and '2099-01-01'`
                 : this.endTime
-                ? ` bian_zhi_shi_jian between '1949-10-01' and '${this.endTime}'`
-                : ``;
+                    ? ` bian_zhi_shi_jian between '1949-10-01' and '${this.endTime}'`
+                    : ``
 
             // 第一级目录
-            if (this.depth == "0") {
-                let nianduWhere = this.niandu
+            if (this.depth == '0') {
+                const nianduWhere = this.niandu
                     ? startTimeWhere
                         ? ` where  nian_du_ like '%${this.niandu}%' and` +
                           startTimeWhere
                         : ` where  nian_du_ like '%${this.niandu}%'`
                     : startTimeWhere
-                    ? " where " + startTimeWhere
-                    : "";
-                let where = nianduWhere
+                        ? ' where ' + startTimeWhere
+                        : ''
+                const where = nianduWhere
                     ? this.guanJian
                         ? nianduWhere +
                           ` and (biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%')`
                         : nianduWhere
                     : this.guanJian
-                    ? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'`
-                    : "";
-                let sql =
-                    "select jl.*,ee.name_ as ry_name FROM t_ywyxjlb jl left join ibps_party_employee ee on ee.id_ = jl.bian_zhi_ren_  LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_" +
+                        ? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'`
+                        : ''
+                const sql =
+                    'select jl.*,ee.name_ as ry_name FROM t_ywyxjlb jl left join ibps_party_employee ee on ee.id_ = jl.bian_zhi_ren_  LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_' +
                     where +
-                    ` order by nian_du_ ${this.sorts.NIAN_DU_}, bian_zhi_shi_jian desc`;
-                curdPost("sql", sql)
+                    ` order by nian_du_ ${this.sorts.NIAN_DU_}, bian_zhi_shi_jian desc`
+                await curdPost('sql', sql)
                     .then((response) => {
-                        let tableDatas = response.variables.data;
+                        const tableDatas = response.variables.data
                         if (tableDatas.length !== 0) {
                             this.selectListData = JSON.parse(
                                 JSON.stringify(tableDatas)
-                            );
-                            let filterDatas = [];
+                            )
+                            let filterDatas = []
                             this.bianlistData.pageResult.totalCount =
-                                tableDatas.length;
+                                tableDatas.length
                             this.bianlistData.pageResult.totalPages = Math.ceil(
                                 tableDatas.length / this.pagination.limit
-                            );
+                            )
                             this.bianlistData.pageResult.limit =
-                                this.pagination.limit;
+                                this.pagination.limit
                             this.bianlistData.pageResult.page =
-                                this.pagination.page;
+                                this.pagination.page
                             if (this.pagination.limit > tableDatas.length) {
                                 filterDatas = JSON.parse(
                                     JSON.stringify(tableDatas)
-                                );
+                                )
                             } else {
                                 for (let index = 0; index < 20; index++) {
-                                    filterDatas.push(tableDatas[index]);
+                                    filterDatas.push(tableDatas[index])
                                 }
                             }
-                            this.bianlistData.dataResult = filterDatas;
-                            ActionUtils.handleListData(this, this.bianlistData);
+                            this.bianlistData.dataResult = filterDatas
+                            ActionUtils.handleListData(this, this.bianlistData)
                         } else {
-                            ActionUtils.handleListData(this, []);
-                            this.pagination.limit = 20;
-                            this.pagination.page = 1;
+                            ActionUtils.handleListData(this, [])
+                            this.pagination.limit = 20
+                            this.pagination.page = 1
                         }
-                        this.loading = false;
+                        this.loading = false
                     })
                     .catch(() => {
-                        this.loading = false;
-                    });
+                        this.loading = false
+                    })
             } else {
                 // 筛选出下级目录
-                let erji = this.treeData.filter((el) => {
-                    return el.parentId === this.typeId;
-                });
+                const erji = this.treeData.filter((el) => {
+                    return el.parentId === this.typeId
+                })
                 if (erji.length !== 0) {
                     // 第二级目录
-                    erji.forEach((el) => typeWheres.push(el.id));
-                    typeWhere = "'" + typeWheres.join("','") + "'";
+                    erji.forEach((el) => typeWheres.push(el.id))
+                    typeWhere = "'" + typeWheres.join("','") + "'"
                 } else {
                     // 第三级目录
-                    typeWhere = this.typeId;
+                    typeWhere = this.typeId
                 }
 
-                let nianduWhere = this.niandu
+                const nianduWhere = this.niandu
                     ? startTimeWhere
                         ? ` where  nian_du_ like '%${this.niandu}%' and` +
                           startTimeWhere
                         : ` where  nian_du_ like '%${this.niandu}%'`
                     : startTimeWhere
-                    ? " where " + startTimeWhere
-                    : "";
-                let idwhere = typeWhere
+                        ? ' where ' + startTimeWhere
+                        : ''
+                const idwhere = typeWhere
                     ? nianduWhere
                         ? nianduWhere + ` and fen_lei_id_ in (${typeWhere})`
                         : ` where fen_lei_id_ in (${typeWhere})`
-                    : nianduWhere
-                    ? nianduWhere
-                    : ``;
-                let where = idwhere
+                    : nianduWhere || ``
+                const where = idwhere
                     ? this.guanJian
                         ? idwhere +
                           ` and (biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%')`
                         : idwhere
                     : this.guanJian
-                    ? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'`
-                    : "";
-                let sql =
+                        ? ` where biao_dan_ming_che like '%${this.guanJian}%' or shi_wu_shuo_ming_ like '%${this.guanJian}%'`
+                        : ''
+                const sql =
                     `select jl.*,file.file_name_,file.ext_,ee.name_ as ry_name  FROM t_ywyxjlb jl  
                     left join ibps_party_employee ee on ee.id_ = jl.bian_zhi_ren_
                     LEFT JOIN lh_bm_ry ry ON ry.ry_id  = jl.bian_zhi_ren_  left join ibps_file_attachment file on jl.fu_jian_ = file.id_ ` +
                     where +
-                    ` order by nian_du_ ${this.sorts.NIAN_DU_},bian_zhi_shi_jian desc`;
+                    ` order by nian_du_ ${this.sorts.NIAN_DU_},bian_zhi_shi_jian desc`
 
-                curdPost("sql", sql)
+                curdPost('sql', sql)
                     .then((response) => {
-                        let tableDatas = response.variables.data;
+                        const tableDatas = response.variables.data
                         if (tableDatas.length !== 0) {
                             this.selectListData = JSON.parse(
                                 JSON.stringify(tableDatas)
-                            );
-                            let filterDatas = [];
+                            )
+                            let filterDatas = []
                             this.bianlistData.pageResult.totalCount =
-                                tableDatas.length;
+                                tableDatas.length
                             this.bianlistData.pageResult.totalPages = Math.ceil(
                                 tableDatas.length / this.pagination.limit
-                            );
+                            )
                             this.bianlistData.pageResult.limit =
-                                this.pagination.limit;
+                                this.pagination.limit
                             this.bianlistData.pageResult.page =
-                                this.pagination.page;
+                                this.pagination.page
                             if (this.pagination.limit > tableDatas.length) {
                                 filterDatas = JSON.parse(
                                     JSON.stringify(tableDatas)
-                                );
+                                )
                             } else {
                                 for (let index = 0; index < 20; index++) {
-                                    filterDatas.push(tableDatas[index]);
+                                    filterDatas.push(tableDatas[index])
                                 }
                             }
-                            this.bianlistData.dataResult = filterDatas;
-                            ActionUtils.handleListData(this, this.bianlistData);
+                            this.bianlistData.dataResult = filterDatas
+                            ActionUtils.handleListData(this, this.bianlistData)
                         } else {
-                            ActionUtils.handleListData(this, []);
-                            this.pagination.limit = 20;
-                            this.pagination.page = 1;
+                            ActionUtils.handleListData(this, [])
+                            this.pagination.limit = 20
+                            this.pagination.page = 1
                         }
 
-                        this.loading = false;
+                        this.loading = false
                     })
                     .catch(() => {
-                        this.loading = false;
-                    });
+                        this.loading = false
+                    })
             }
         },
         // getParenthesesStr(text) {
@@ -447,235 +479,238 @@ export default {
         /**
          * 获取格式化参数
          */
-        getSearcFormData() {
-            const params = this.$refs["crud"]
-                ? this.$refs["crud"].getSearcFormData()
-                : {};
-            if (JSON.stringify(params) == "{}") {
-                this.guanJian = "";
-                this.niandu = ""; // 年度
-                this.startTime = ""; // 开始时间
-                this.endTime = ""; // 结束时间
+        getSearcFormData () {
+            const params = this.$refs['crud']
+                ? this.$refs['crud'].getSearcFormData()
+                : {}
+            if (JSON.stringify(params) == '{}') {
+                this.guanJian = ''
+                this.niandu = '' // 年度
+                this.startTime = '' // 开始时间
+                this.endTime = '' // 结束时间
             } else {
-                this.guanJian = params.guanJian ? params.guanJian : "";
-                this.niandu = params.nianDu ? params.nianDu : ""; // 年度
-                this.startTime = params.b ? params.b : ""; // 开始时间
-                this.endTime = params.i ? params.i : ""; // 结束时间
+                this.guanJian = params.guanJian ? params.guanJian : ''
+                this.niandu = params.nianDu ? params.nianDu : '' // 年度
+                this.startTime = params.b ? params.b : '' // 开始时间
+                this.endTime = params.i ? params.i : '' // 结束时间
             }
         },
         /**
          * 处理分页事件
          */
-        handlePaginationChange(page) {
-            ActionUtils.setPagination(this.pagination, page);
-            this.bianlistData.pageResult.limit = page.limit;
-            this.bianlistData.pageResult.page = page.page;
-            let filterDatas = [];
+        handlePaginationChange (page) {
+            ActionUtils.setPagination(this.pagination, page)
+            this.bianlistData.pageResult.limit = page.limit
+            this.bianlistData.pageResult.page = page.page
+            const filterDatas = []
             if (this.selectListData.length >= page.limit * page.page) {
                 for (
                     let index = page.limit * page.page - page.limit;
                     index < page.limit * page.page;
                     index++
                 ) {
-                    filterDatas.push(this.selectListData[index]);
+                    filterDatas.push(this.selectListData[index])
                 }
                 this.bianlistData.dataResult = JSON.parse(
                     JSON.stringify(filterDatas)
-                );
+                )
             } else {
                 for (
                     let index = page.limit * page.page - page.limit;
                     index < this.selectListData.length;
                     index++
                 ) {
-                    filterDatas.push(this.selectListData[index]);
+                    filterDatas.push(this.selectListData[index])
                 }
                 this.bianlistData.dataResult = JSON.parse(
                     JSON.stringify(filterDatas)
-                );
+                )
             }
-            ActionUtils.handleListData(this, this.bianlistData);
+            ActionUtils.handleListData(this, this.bianlistData)
         },
 
         /**
          * 查询
          */
-        search() {
-            this.pagination.limit = 20;
-            this.pagination.page = 1;
-            this.getSearcFormData();
-            this.loadData();
+        search () {
+            this.pagination.limit = 20
+            this.pagination.page = 1
+            this.getSearcFormData()
+            this.loadData()
         },
         /* 防止多次快速查询*/
-        numbersClick() {
-            this.isDisable = true;
+        numbersClick () {
+            this.isDisable = true
             setTimeout(() => {
-                this.isDisable = false;
-            }, 600);
+                this.isDisable = false
+            }, 600)
         },
-        handleDelete(mes) {
-            this.$confirm(`${mes}`, "提示", {
-                type: "warning",
+        handleDelete (mes) {
+            this.$confirm(`${mes}`, '提示', {
+                type: 'warning'
             })
                 .then(() => {})
-                .catch(() => {});
+                .catch(() => {})
         },
         /**
          * 处理按钮事件
          */
-        handleAction(command, position, selection, data) {
-            let this_ = this;
+        handleAction (command, position, selection, data) {
+            const this_ = this
             switch (command) {
-                case "search": // 查询
-                    ActionUtils.setFirstPagination(this.pagination);
-                    this.search();
-                    break;
+                case 'search': // 查询
+                    ActionUtils.setFirstPagination(this.pagination)
+                    this.search()
+                    break
                 // case 'resetSearch':
                 //   this.typeId = ''
                 //   this.tableTitle = ''
                 //   this.search()
                 //   break
-                case "remove":
-                    var str = "";
+                case 'remove':
+                    var str = ''
                     if (selection == undefined) {
-                        this.handleDelete("请选择数据再进行删除!");
-                        return;
+                        this.handleDelete('请选择数据再进行删除!')
+                        return
                     }
                     if (selection.length == 0) {
-                        this.handleDelete("请选择数据再进行删除!");
-                        return;
+                        this.handleDelete('请选择数据再进行删除!')
+                        return
                     } else {
-                        this.$confirm("确定是要删除数据吗?", "提示", {
-                            type: "warning",
+                        this.$confirm('确定是要删除数据吗?', '提示', {
+                            type: 'warning'
                         })
                             .then(() => {
                                 selection.forEach((item, index) => {
                                     if (index == 0) {
-                                        str += item;
+                                        str += item
                                     } else {
-                                        str += "," + item;
+                                        str += ',' + item
                                     }
-                                });
-                                let data = {};
-                                data["tableName"] = "t_ywyxjlb";
-                                data["paramWhere"] = "{id_:'" + str + "'}";
+                                })
+                                const data = {}
+                                data['tableName'] = 't_ywyxjlb'
+                                data['paramWhere'] = "{id_:'" + str + "'}"
 
-                                curdPost("batchDelete", data).then(
+                                curdPost('batchDelete', data).then(
                                     (response) => {
                                         this_.$message({
-                                            message: "删除成功!",
-                                            type: "success",
-                                        });
-                                        this.search();
+                                            message: '删除成功!',
+                                            type: 'success'
+                                        })
+                                        this.search()
                                     }
-                                );
+                                )
                             })
                             .catch(() => {
                                 this_.$message({
-                                    message: "取消删除",
-                                    type: "warning",
-                                });
-                            });
+                                    message: '取消删除',
+                                    type: 'warning'
+                                })
+                            })
                     }
-                    break;
-                case "add": // 添加
-                    this.openTask("1072813170935988224");
-                    break;
-                // case 'edit': // 编辑
-                //   ActionUtils.selectedRecord(selection).then((id) => {
-                //     console.log('selection', selection)
-                //     let filterDatas = this.listData.filter(fil => {
-                //       return fil.id_ = fil
-                //     })
-                //     this.dialogFormVisible = true
-                //     // this.defId = '1072813170935988224'
-                //     this.pkValue = id
-
-                //     // console.log('id', id)
-                //     // console.log('filterDatas', filterDatas)
-
-                //     // this.addDataCont.nianDu = filterDatas[0].nian_du_
-                //     // this.addDataCont.biaoDanMingCheng = filterDatas[0].biao_dan_ming_che
-                //     // this.addDataCont.fuJian = filterDatas[0].biao_dan_ming_che
-                //     // this.addDataCont.shiWuShuoMing = filterDatas[0].shi_wu_shuo_ming_
-                //     // console.log('this.addDataCont', this.addDataCont)
-
-                //   }).catch(() => { })
-                //   break
-                case "export":
-                    var str = "";
+                    break
+                case 'add': // 添加
+                    this.openTask('1072813170935988224')
+                    break
+                case 'edit': // 编辑
+                    ActionUtils.selectedRecord(selection).then((id) => {
+                        this.editPkValue = id
+                        this.editDialogVisible = true
+                    }).catch(() => { })
+                    break
+                case 'export':
+                    var str = ''
                     if (selection == undefined) {
-                        this.handleDelete("请选择数据再进行导出!");
-                        return;
+                        this.handleDelete('请选择数据再进行导出!')
+                        return
                     }
                     if (selection.length == 0) {
-                        this.handleDelete("请选择数据再进行导出!");
-                        return;
+                        this.handleDelete('请选择数据再进行导出!')
+                        return
                     } else {
-                        this.$confirm("确定是要导出数据吗?", "提示", {
-                            type: "warning",
+                        this.$confirm('确定是要导出数据吗?', '提示', {
+                            type: 'warning'
                         })
                             .then(() => {
                                 data.forEach((item, index) => {
-                                    let param = {
+                                    const param = {
                                         id: item.fu_jian_,
                                         fileName: item.file_name_,
-                                        ext: item.ext_,
-                                    };
-                                    downloadFile(param);
-                                });
+                                        ext: item.ext_
+                                    }
+                                    downloadFile(param)
+                                })
                             })
                             .catch(() => {
                                 this_.$message({
-                                    message: "取消导出",
-                                    type: "warning",
-                                });
-                            });
+                                    message: '取消导出',
+                                    type: 'warning'
+                                })
+                            })
                     }
-                    break;
+                    break
+
+                    break
                 default:
-                    break;
+                    break
             }
         },
+
+        handleEdit (id = '', readonly = false) {
+            this.editId = id
+            this.readonly = readonly
+            this.dialogFormVisible = true
+        },
+        async editClose (visible) {
+            this.loadingEdit = true
+            this.editDialogVisible = visible
+            this.listData = []
+            await this.loadData()
+            setTimeout(() => {
+                this.handlePaginationChange(this.bianlistData.pageResult)
+                this.loadingEdit = false
+            }, 1000)
+        },
         /**
          * 处理排序
          */
-        handleSortChange(sort) {
-            ActionUtils.setSorts(this.sorts, sort);
-            this.loadData();
+        handleSortChange (sort) {
+            ActionUtils.setSorts(this.sorts, sort)
+            this.loadData()
         },
-        handleNodeClick(typeId, typeName, treeData) {
-            this.tableTitle = typeName.name;
-            this.typeId = typeId;
-            this.treeData = treeData;
-            this.depth = typeName.depth;
-            this.loadData();
+        handleNodeClick (typeId, typeName, treeData) {
+            this.tableTitle = typeName.name
+            this.typeId = typeId
+            this.treeData = treeData
+            this.depth = typeName.depth
+            this.loadData()
             // 判断是否存在下级菜单
-            let state = this.treeData.filter((el) => {
-                return el.parentId === this.typeId;
-            });
-            let pageName = this.$route.name;
+            const state = this.treeData.filter((el) => {
+                return el.parentId === this.typeId
+            })
+            const pageName = this.$route.name
 
-            if (state.length == 0 && pageName == "wjkzgl-ywyxjlsc") {
-                let chongfu = this.listConfig.toolbars.filter((el) => {
-                    return el.key === "add";
-                });
+            if (state.length == 0 && pageName == 'wjkzgl-ywyxjlsc') {
+                const chongfu = this.listConfig.toolbars.filter((el) => {
+                    return el.key === 'add'
+                })
                 if (chongfu.length == 0 && this.depth !== 0) {
-                    this.listConfig.toolbars.push({ key: "add" });
+                    this.listConfig.toolbars.push({ key: 'add' })
                 }
             } else {
                 this.listConfig.toolbars = this.listConfig.toolbars.filter(
                     (el) => {
-                        return el.key !== "add";
+                        return el.key !== 'add'
                     }
-                );
+                )
             }
         },
-        handleExpandCollapse(isExpand) {
-            this.width = isExpand ? 230 : 30;
-        },
-    },
-};
+        handleExpandCollapse (isExpand) {
+            this.width = isExpand ? 230 : 30
+        }
+    }
+}
 </script>
 <style lang="scss">
 .main-container .div_test {