Kaynağa Gözat

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

houlf 3 yıl önce
ebeveyn
işleme
a0e315b306

+ 74 - 0
src/pages/main/gridDivision/components/dialog.vue

@@ -0,0 +1,74 @@
+<template>
+  <el-dialog
+    :modal="modal"
+    :title="title"
+    :visible.sync="visible"
+    :fullscreen="fullscreen"
+    :key="reload"
+    :before-close="handleCancel"
+    :modal-append-to-body="false"
+    :width="width"
+    :destroy-on-close="destroy"
+  >
+    <!-- 表格主体部分 -->
+    <slot></slot>
+    <!-- 表格底部 -->
+    <div slot="footer">
+      <slot name="footer">
+        <el-button @click="handleCancel" size="small">取消</el-button>
+        <el-button @click="handleConfirm" type="primary" size="small"
+          >确定</el-button
+        >
+      </slot>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+  props: {
+    visible: {
+      type: Boolean,
+      default: false,
+    },
+    title: {
+      type: String,
+      default: "",
+    },
+    reload: {
+      type: Number,
+      default: 0,
+    },
+    width: {
+      type: String,
+      default: "500px",
+    },
+    fullscreen: {
+      type: Boolean,
+      default: false,
+    },
+    modal: {
+      type: Boolean,
+      default: true,
+    },
+    destroy: {
+      type: Boolean,
+      default: false
+    }
+  },
+  mounted() {
+  },
+  methods: {
+    //   确定的回调
+    handleConfirm() {
+      this.$emit("confirm", false);
+    },
+    //   取消的回调
+    handleCancel() {
+      this.$emit("cancel", false);
+    },
+  },
+};
+</script>
+
+<style></style>

+ 94 - 0
src/pages/main/gridDivision/components/form.vue

@@ -0,0 +1,94 @@
+<!--
+ * @Author       : yuanrunwei
+ * @Date         : 2021-11-01 18:03:02
+ * @LastEditors  : yuanrunwei
+ * @LastEditTime : 2021-12-04 17:53:54
+ * @FilePath     : \spfm-market-front\src\pages\main\performance\components\form.vue
+-->
+<template>
+    <el-form :inline="true" :model="object">
+        <el-row :gutter="24">
+            <el-col
+                v-for="({ props, label, type, dictionary }, index) in form"
+                :key="index"
+                :span="6"
+            >
+                <el-form-item :label="label">
+                    <template v-if="type === 'select'">
+                        <el-select
+                            v-model="object[props]"
+                            :placeholder="label"
+                            filterable
+                            clearable
+                        >
+                            <el-option
+                                :label="label"
+                                :value="value"
+                                v-for="({ label, value }, index) in dictionary"
+                                :key="index"
+                            ></el-option>
+                        </el-select>
+                    </template>
+                    <template v-else-if="['date', 'month'].includes(type)">
+                        <el-date-picker
+                            v-model="object[props]"
+                            :type="type"
+                            :placeholder="label"
+                        >
+                        </el-date-picker>
+                    </template>
+                    <template v-else>
+                        <el-input
+                            v-model="object[props]"
+                            :placeholder="label"
+                            clearable
+                        ></el-input>
+                    </template>
+                </el-form-item>
+            </el-col>
+            <el-col :span="6">
+                <el-form-item>
+                    <el-button type="primary" @click="handleSearch"
+                        >搜索</el-button
+                    >
+                </el-form-item>
+            </el-col>
+            <el-col class="flex-justify-align-end" :span="24">
+                <el-button
+                    v-for="({ label, props }, index) in handle"
+                    :key="index"
+                    @click="handleSubmit(props)"
+                >
+                    <i class="el-icon-document-add font-weight-bold" />{{
+                        label
+                    }}
+                </el-button>
+            </el-col>
+        </el-row>
+    </el-form>
+</template>
+<script>
+export default {
+    props: {
+        form: {
+            type: Array,
+            default: () => [],
+        },
+        handle: {
+            type: Array,
+            default: () => [],
+        },
+    },
+    data: () => ({
+        object: {},
+    }),
+    methods: {
+        handleSearch() {
+            this.$emit("search", this.object);
+        },
+        handleSubmit(params) {
+            this.$emit(params, this.object);
+        },
+    },
+};
+</script>

+ 38 - 0
src/pages/main/gridDivision/components/pagination.vue

@@ -0,0 +1,38 @@
+<!--
+ * @Author       : yuanrunwei
+ * @Date         : 2021-11-01 18:11:59
+ * @LastEditors  : yuanrunwei
+ * @LastEditTime : 2021-11-02 14:27:11
+ * @FilePath     : \spfm-front\src\pages\main\dataConfig\components\pagination.vue
+-->
+<template>
+    <el-pagination
+        class="simple-pagination"
+        @current-change="handleChange"
+        layout="prev, pager, next"
+        background
+        :current-page="page"
+        :total="total"
+    >
+    </el-pagination>
+</template>
+<script>
+export default {
+    props: {
+        page: {
+            type: Number,
+            default: 0
+        },
+        total: {
+            type: Number,
+            default: 0
+        }
+    },
+    data: () => ({}),
+    methods: {
+        handleChange(page) {
+            this.$emit("change", page);
+        }
+    }
+};
+</script>

+ 530 - 0
src/pages/main/gridDivision/components/sheet.vue

@@ -0,0 +1,530 @@
+<!--
+ * @Author       : yuanrunwei
+ * @Date         : 2021-12-04 14:23:58
+ * @LastEditors  : yuanrunwei
+ * @LastEditTime : 2021-12-28 20:20:48
+ * @FilePath     : \spfm-market-front\src\pages\main\performance\components\sheet.vue
+-->
+
+<template>
+    <div class="sheet-container">
+        <div class="flex-justify-align-end margin-bottom-20">
+            <el-button
+                type="primary"
+                @click="handleVisible"
+                v-if="['template'].includes(attribute)"
+                >权限设置</el-button
+            >
+            <el-button type="primary" @click="handleDownload">导出</el-button>
+            <el-button type="primary" @click="handleFullscreen()"
+                >全屏显示</el-button
+            >
+            <template v-if="['edit'].includes(type)">
+                <el-upload
+                    v-if="!id"
+                    class="margin-right-10 margin-left-10"
+                    action
+                    :on-change="handleChange"
+                    :show-file-list="false"
+                >
+                    <el-button type="primary">上传</el-button>
+                </el-upload>
+                <el-button
+                    type="primary"
+                    @click="handleSave"
+                    :disabled="handleForbid()"
+                    ><span>{{ id ? "提交" : "新增" }}</span
+                    ><span>{{
+                        handleForbid() ? `(请先设置权限)` : ""
+                    }}</span></el-button
+                >
+            </template>
+        </div>
+        <div id="luckysheet" class="sheet-container-block"></div>
+        <simple-dialog
+            title="权限设置"
+            :visible="visible"
+            :modal="false"
+            width="700px"
+            @confirm="handleAuth"
+            @cancel="handleVisible"
+        >
+            <el-form ref="form" :model="form" label-width="100px">
+                <el-form-item
+                    label="可编辑列"
+                    prop="array"
+                    :rules="{
+                        required: true,
+                        message: '可编辑列不能为空',
+                        trigger: 'change',
+                    }"
+                    ><el-select
+                        v-model="form.array"
+                        placeholder="可编辑列"
+                        multiple
+                    >
+                        <el-option
+                            v-for="(value, index) in 10"
+                            :key="index"
+                            :label="index + 1"
+                            :value="index + 1"
+                        >
+                        </el-option> </el-select
+                ></el-form-item>
+                <el-form-item
+                    label="权限规则"
+                    prop="type"
+                    :rules="{
+                        required: true,
+                        message: '权限规则不能为空',
+                        trigger: 'change',
+                    }"
+                >
+                    <el-select v-model="form.type">
+                        <el-option
+                            v-for="item in type_options"
+                            :key="item.value"
+                            :label="item.label"
+                            :value="item.value"
+                        ></el-option> </el-select
+                ></el-form-item>
+                <el-form-item
+                    label="负责人"
+                    prop="charge"
+                    :rules="{
+                        required: true,
+                        message: '负责人不能为空',
+                        trigger: 'blur',
+                    }"
+                >
+                    <div
+                        class="flex-justify-start"
+                        v-for="(item, index) in form.charge"
+                        :key="index"
+                    >
+                        <el-select
+                            v-model="item.key"
+                            class="margin-bottom-20 margin-right-10 flex-1"
+                            placeholder="请选择指定列/行"
+                            multiple
+                        >
+                            <el-option
+                                v-for="(value, index) in 10"
+                                :key="index"
+                                :label="index + 1"
+                                :value="index + 1"
+                            >
+                            </el-option>
+                        </el-select>
+                        <el-select
+                            class="margin-bottom-20"
+                            placeholder="请选择负责人"
+                            v-model="item.value"
+                            filterable
+                        >
+                            <el-option
+                                v-for="({ label, value }, index) in charge_list"
+                                :key="index"
+                                :label="label"
+                                :value="value"
+                            ></el-option>
+                        </el-select>
+                    </div>
+
+                    <div>
+                        <el-button @click.prevent="handleCharge('add')"
+                            >添加</el-button
+                        >
+                        <el-button
+                            v-if="form.charge.length - 1"
+                            @click.prevent="handleCharge('delete')"
+                            >删除</el-button
+                        >
+                    </div>
+                </el-form-item>
+            </el-form>
+            <template v-if="!id" v-slot:footer><div></div></template>
+        </simple-dialog>
+    </div>
+</template>
+
+<script>
+import luckyexcel from "luckyexcel";
+import { exportExcel } from "../common/export";
+import simpleDialog from "./dialog.vue";
+export default {
+    components: {
+        simpleDialog,
+    },
+    props: {
+        type: {
+            type: String,
+            default: "view", // view 查看 edit 编辑
+        },
+        attribute: {
+            type: String,
+            default: "template", // template 模板 order 工单 file 文件
+        },
+        id: {
+            default: null,
+        },
+    },
+    data() {
+        return {
+            form: {
+                charge: [{ value: "" }],
+            },
+            issued_id: null,
+            template_id: null,
+            visible: false,
+            row_list: [],
+            column_list: [],
+            charge_list: [],
+            type_options: [
+                {
+                    value: 1,
+                    label: "按行",
+                },
+                // {
+                //     value: 2,
+                //     label: "按列",
+                // },
+            ],
+        };
+    },
+    methods: {
+        handleInit() {
+            if (this.id) {
+                this.handleQuery();
+            } else {
+                this.handleCreate();
+            }
+        },
+        handleAllow({ row, column }) {
+            return (
+                this.row_list.includes(row) && this.column_list.includes(column)
+            );
+        },
+        async handleQuery() {
+            let url = "";
+            let key = "";
+            switch (this.attribute) {
+                case "template":
+                    url = "/market/CMKFileTemplate/QueryCMKFileTemplateById";
+                    key = "templateId";
+                    break;
+                case "order":
+                    url = "/market/CMKIssued/CMKQueryIssuedById";
+                    key = "id";
+                    break;
+                case "file":
+                    url = "/market/CMKIssued/CMKIssuedProcessByUser";
+                    key = "id";
+                    break;
+            }
+            const {
+                data: {
+                    templateContent,
+                    templateName,
+                    issuedId,
+                    templateId,
+                    list,
+                },
+            } = await this.$http({
+                url,
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    [key]: this.id,
+                },
+            });
+            this.template_id = templateId;
+            this.issued_id = issuedId;
+            if (list && list.length) {
+                const [{ type, allowEditingColumns, rowNum }] = list;
+                this.form = {
+                    ...this.form,
+                    type: JSON.parse(type),
+                    array: allowEditingColumns
+                        ? allowEditingColumns.split(",")
+                        : [],
+                    charge: list.map(
+                        ({ principalId, principalName, rowNum }) => ({
+                            value: `${principalId},${principalName}`,
+                            key: rowNum.split(","),
+                        })
+                    ),
+                };
+                this.row_list =
+                    this.type === "edit"
+                        ? rowNum
+                              .split(",")
+                              .map((element) => JSON.parse(element) - 1)
+                        : [];
+                this.column_list =
+                    this.type === "edit"
+                        ? allowEditingColumns
+                              .split(",")
+                              .map((element) => JSON.parse(element) - 1)
+                        : [];
+            }
+            this.handleCreate({
+                json: templateContent ? JSON.parse(templateContent) : {},
+                name: templateName,
+                type: "json",
+            });
+        },
+        handleForbid() {
+            const object = {};
+            const { array, type, charge } = this.form;
+            charge.map(({ key, value }) => {
+                if (key && value) {
+                    object[key] = value;
+                }
+            });
+            return !(Object.keys(object).length && array.length && type);
+        },
+        async handleCreate({ file, json, type, name } = {}) {
+            let that = this;
+            const options = {
+                container: "luckysheet",
+                lang: "zh",
+                showsheetbar: false,
+                hook: {
+                    cellEditBefore: function ([
+                        { row_focus: row, column_focus: column },
+                    ]) {
+                        if (!that.handleAllow({ row, column })) {
+                            that.$message.error("您没有编辑权限");
+                        }
+                    },
+                    cellUpdateBefore: function (row, column) {
+                        if (!that.handleAllow({ row, column })) {
+                            return false;
+                        }
+                    },
+                    cellRenderAfter: function (cell, position) {
+                        const { r: row, c: column } = position;
+                        if (cell) {
+                            if (!that.handleAllow({ row, column })) {
+                                cell.bg = "#d5d5d5";
+                            } else {
+                                cell.bg = "#ffffff";
+                            }
+                        }
+                    },
+                },
+            };
+            switch (type) {
+                case "file":
+                    if (file) {
+                        await new Promise((resolve) => {
+                            luckyexcel.transformExcelToLucky(
+                                file,
+                                (export_json) => {
+                                    options.data = [
+                                        ...export_json.sheets.map(
+                                            (element) => ({
+                                                ...element,
+                                                zoomRatio: 0.75,
+                                            })
+                                        ),
+                                    ];
+                                    options.title = export_json.info.name;
+                                    resolve();
+                                }
+                            );
+                        });
+                    }
+                    break;
+                case "json":
+                    if (json) {
+                        options.data = [
+                            {
+                                ...json,
+                                zoomRatio: 0.75,
+                            },
+                        ];
+                        options.title = name;
+                    }
+                    break;
+            }
+
+            window.luckysheet.create(options);
+            let clock = setInterval(() => {
+                if (window.luckysheet) {
+                    window.luckysheet.refresh();
+                    clearInterval(clock);
+                }
+            }, 1000);
+        },
+        async handleChange(response) {
+            this.handleCreate({ file: response.raw, type: "file" });
+        },
+        handleDownload() {
+            exportExcel(
+                window.luckysheet.getAllSheets(),
+                window.luckysheet.getWorkbookName()
+            );
+        },
+        async handleAddAuth({ id }) {
+            const object = {};
+            const { array, charge, type } = this.form;
+            charge.map(({ key, value }) => {
+                if (key && value) {
+                    object[key] = value;
+                }
+            });
+            await this.$http({
+                url: this.id
+                    ? "/market/CMKFileTemplateAuthority/CMKFileTemplateAuthorityUpdate"
+                    : "/market/CMKFileTemplateAuthority/CMKFileTemplateAuthorityAdd",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    allowEditingColumns: array.join(","),
+                    auth: JSON.stringify(object),
+                    templateId: id,
+                    type,
+                },
+            });
+            this.$message.success("操作成功");
+        },
+        async handleSave() {
+            let edit_url = "";
+            switch (this.attribute) {
+                case "template":
+                    edit_url = "";
+                    break;
+                case "order":
+                    edit_url = "";
+                    break;
+                case "file":
+                    edit_url = "/market/CMKIssued/CMKIssuedSubmit";
+                    break;
+            }
+            const sheet_name = window.luckysheet.getSheet().name;
+            const data = window.luckysheet.getSheet(sheet_name);
+            const workbook_name = window.luckysheet.getWorkbookName();
+            const {
+                data: { body },
+            } = await this.$http({
+                url: this.id
+                    ? edit_url // 编辑
+                    : "/market/CMKFileTemplate/CMKFileTemplateAdd", // 新增
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    id: this.template_id,
+                    templateContent: JSON.stringify(data),
+                    templateName: workbook_name,
+                    issuedId: this.issued_id,
+                },
+            });
+            // 新增时添加权限
+            if (!this.id) {
+                this.handleAddAuth({ id: body });
+            } else {
+                this.$message.success("提交成功");
+            }
+            this.$emit("save");
+        },
+        handleAuth() {
+            this.$refs["form"].validate((valid) => {
+                if (valid) {
+                    if (this.handleForbid()) {
+                        this.$message.error("请选择负责人编辑权限");
+                        return false;
+                    }
+                    this.handleVisible();
+                    if (this.id) {
+                        this.handleAddAuth({ id: this.id });
+                    } else {
+                        this.$message.success("设置成功");
+                    }
+                }
+            });
+        },
+        handleCharge(type) {
+            switch (type) {
+                case "add":
+                    this.form.charge.push({
+                        value: "",
+                    });
+                    break;
+                case "delete":
+                    this.form.charge.pop();
+                    break;
+            }
+        },
+        handleVisible() {
+            this.visible = !this.visible;
+        },
+        handleFullscreen() {
+            const element = document.body;
+            const is_fullscreen =
+                document.fullScreen ||
+                document.mozFullScreen ||
+                document.webkitIsFullScreen;
+            if (!is_fullscreen) {
+                //进入全屏,多重短路表达式
+                (element.requestFullscreen && element.requestFullscreen()) ||
+                    (element.mozRequestFullScreen &&
+                        element.mozRequestFullScreen()) ||
+                    (element.webkitRequestFullscreen &&
+                        element.webkitRequestFullscreen()) ||
+                    (element.msRequestFullscreen &&
+                        element.msRequestFullscreen());
+            } else {
+                //退出全屏,三目运算符
+                document.exitFullscreen
+                    ? document.exitFullscreen()
+                    : document.mozCancelFullScreen
+                    ? document.mozCancelFullScreen()
+                    : document.webkitExitFullscreen
+                    ? document.webkitExitFullscreen()
+                    : "";
+            }
+        },
+        handleChargeList() {
+            this.$http({
+                url: "/market/techcentergj/queryLeaderList",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {},
+            }).then((response) => {
+                this.charge_list = response.data.map((element) => ({
+                    label: `${element.ou} ${element.secLeaderName}`,
+                    value: `${element.secLeaderLogin},${element.secLeaderName}`,
+                }));
+            });
+        },
+    },
+    mounted() {
+        this.handleInit();
+        this.handleChargeList();
+    },
+};
+</script>
+
+<style lang="scss" scope>
+.sheet-container {
+    position: fixed;
+    width: calc(100% - 40px);
+    height: 100%;
+    &-block {
+        overflow: hidden;
+        position: absolute;
+        width: 100%;
+        height: 75%;
+    }
+}
+</style>

+ 167 - 0
src/pages/main/gridDivision/components/table.vue

@@ -0,0 +1,167 @@
+<!--
+ * @Author       : yuanrunwei
+ * @Date         : 2021-11-01 18:02:58
+ * @LastEditors: Please set LastEditors
+ * @LastEditTime: 2022-01-06 12:02:24
+ * @FilePath     : \spfm-market-front\src\pages\main\performance\components\table.vue
+-->
+<template>
+  <el-table class="simple-table" :data="computed_list" v-loading="loading" @selection-change="handleSelectionChange">
+    <el-table-column type="selection" width="55" v-if="multiple" />
+    <el-table-column
+      v-for="(
+        { props, label, type, width, align, children, dictionary }, index
+      ) in config"
+      :key="index"
+      :prop="props"
+      :width="width"
+      :label="label"
+      :align="align || 'center'"
+    >
+      <template #default="scope">
+        <div v-if="type === 'edit'">
+          <el-input
+            v-if="scope.row[`edit`]"
+            v-model="scope.row[props]"
+            autosize
+            type="textarea"
+            @change="handleModify"
+          />
+        </div>
+        <div v-else-if="type === 'textarea'">
+          <pre class="simple-table-break">{{ scope.row[props] }}</pre>
+        </div>
+        <div v-else-if="type === 'date'">
+          <div>{{ $formatDate(scope.row[props], "YYYY-MM-DD") }}</div>
+        </div>
+        <div v-else-if="type === 'click'">
+          <div
+            class="simple-table-click cursor-pointer"
+            @click="handleClick(props, scope.row)"
+          >
+            {{ 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">
+        <el-table-column
+          v-for="({ props, label, width, align, type }, index) in children"
+          :key="index"
+          :prop="props"
+          :width="width"
+          :label="label"
+          :align="align || 'center'"
+        >
+          <template #default="scope">
+            <div v-if="type === 'edit'">
+              <el-input
+                v-model="scope.row[props]"
+                @change="handleModify"
+                autosize
+                type="textarea"
+              />
+            </div>
+            <div v-else>{{ scope.row[props] }}</div>
+          </template>
+        </el-table-column>
+      </template>
+    </el-table-column>
+    <el-table-column
+      v-if="handleRow.length"
+      label="操作"
+      :width="handleRow.length * 50"
+    >
+      <template slot-scope="scope">
+        <span
+          v-for="({ label, props, popconfirm, visible }, index) in handleRow"
+          :key="index"
+          class="padding-right-5"
+        >
+          <span v-if="handleFormat(visible, scope.row)">
+            <el-popconfirm
+              v-if="popconfirm"
+              :title="`确定要${label}吗?`"
+              @confirm="handleClick(props, scope.row)"
+              @cancel="handleCancel"
+            >
+              <el-button slot="reference" type="text" size="small">{{
+                label
+              }}</el-button>
+            </el-popconfirm>
+            <el-button
+              v-else
+              @click="handleClick(props, scope.row)"
+              type="text"
+              size="small"
+              >{{ label }}</el-button
+            >
+          </span>
+        </span>
+      </template>
+    </el-table-column>
+  </el-table>
+</template>
+<script>
+export default {
+  props: {
+    list: {
+      type: Array,
+      default: () => [],
+    },
+    config: {
+      type: Array,
+      default: () => [],
+    },
+    multiple: {
+      type: Boolean,
+      default: false,
+    },
+    loading: {
+      type: Boolean,
+      default: false,
+    },
+    handleRow: {
+      type: Array,
+      default: () => [],
+    },
+  },
+  computed: {
+    computed_list() {
+      return this.list.map((element) => ({
+        ...element,
+      }));
+    },
+  },
+  methods: {
+    handleFormat(params, data) {
+      let visible = true;
+      if (params) {
+        visible = false;
+        Object.keys(params).forEach((element) => {
+          if (params[element].includes(data[element])) {
+            visible = true;
+          }
+        });
+      }
+      return visible;
+    },
+    handleClick(props, row) {
+      console.log("aaaaaaaaa");
+      this.$emit(props, row);
+    },
+    handleCancel() {
+      console.log("我被关闭了");
+    },
+    handleSelectionChange(val){
+        this.$emit("selection",val)
+    },
+    handleModify() {
+      this.$emit("modify", this.computed_list);
+    },
+  },
+};
+</script>

+ 301 - 0
src/pages/main/gridDivision/workersList.vue

@@ -0,0 +1,301 @@
+<template>
+  <div>
+    <div class="simple-container">
+      <simple-form
+        :form="table_form"
+        :handle="table_handle"
+        @search="handleSearch"
+        @summary="handleVisible('summary')"
+        @add="handleVisible('add')"
+      >
+      </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-dialog
+        title="新建"
+        width="40%"
+        @cancel="handleVisible('add')"
+        @confirm="handleAdd"
+        :visible="add_visible"
+      >
+        <el-form
+          label-width="60px"
+          :model="add_form"
+          ref="add_ref"
+        >
+          <el-form-item
+            label="提出人"
+            prop="reason"
+            :rules="{
+                        required: true,
+                        message: '提出人不能为空',
+                        trigger: 'blur',
+                    }"
+          >
+            <el-input v-model="add_form.reason"></el-input>
+          </el-form-item>
+          <el-form-item
+            label="联系电话"
+            prop="precautions"
+            :rules="{
+                        required: true,
+                        message: '联系电话不能为空',
+                        trigger: 'blur',
+                    }"
+          >
+            <el-input v-model="add_form.precautions"></el-input>
+          </el-form-item>
+          <el-form-item
+            label="网格划分需求"
+            prop="endTime"
+            :rules="{
+                        required: true,
+                        message: '网格划分需求不能为空',
+                        trigger: 'blur',
+                    }"
+          >
+            <el-input
+              type="textarea"
+              v-model="add_form.desc"
+            ></el-input>
+          </el-form-item>
+          <el-form-item
+            label="附件上传"
+            prop=""
+          >
+            <el-upload
+              class="upload-demo"
+              drag
+              action="https://jsonplaceholder.typicode.com/posts/"
+              multiple
+            >
+              <i class="el-icon-upload"></i>
+              <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+            </el-upload>
+          </el-form-item>
+          <el-form-item
+            label="审批轨迹"
+            prop=""
+          >
+            <simple-table
+              :list="table_list_approve"
+              :config="table_config_approve"
+              :loading="table_loading_approve"
+            ></simple-table>
+          </el-form-item>
+        </el-form>
+      </simple-dialog>
+      <simple-dialog
+        title="工单汇总"
+        width="40%"
+        @cancel="handleVisible('summary')"
+        @confirm="handleAdd"
+        :visible="summary_visible"
+      >
+        <div class="summary">
+          <p>是否要对所选工单进行汇总?</p>
+          <p class="summary-tip">可对未审批的区县网格划分审批工单合并为同一条工单,由相关审批人员进行审批,减少审批工作量</p>
+        </div>
+      </simple-dialog>
+    </div>
+  </div>
+</template>
+
+<script>
+import simpleForm from "./components/form.vue";
+import simpleTable from "./components/table.vue";
+import simpleDialog from "./components/dialog.vue";
+// import simplePagination from "./components/pagination.vue";
+
+export default {
+  components: {
+    simpleForm,
+    simpleDialog,
+    simpleTable,
+    // simplePagination,
+  },
+  data() {
+    return {
+      // 新建模态框
+      add_visible: false,
+      summary_visible: false,
+      edit_visible: false,
+      add_form: {},
+      table_handle: [
+        {
+          label: "工作汇总",
+          props: "summary",
+        },
+        {
+          label: "新建",
+          props: "add",
+        },
+      ],
+      table_form: [
+        {
+          label: "公司名称",
+          props: "name",
+          type: "input",
+        },
+        {
+          label: "状态",
+          props: "status",
+          type: "select",
+          // 0.待办  1.已办
+          dictionary: [
+            {
+              label: "待办",
+              value: "0",
+            },
+            {
+              label: "已办",
+              value: "1",
+            },
+          ],
+        },
+      ],
+      // 列表数据
+      table_list: [
+        {
+          number: 1,
+          cpmName: "xq",
+          person: "mll",
+          createTime: 1654563154824,
+          status: 0,
+        },
+        {
+          number: 2,
+          cpmName: "xq",
+          person: "mll",
+          createTime: 1654963568455,
+          status: 1,
+        },
+      ],
+      table_loading: false,
+      //   表格里的操作按钮
+      table_handle_row: [
+        {
+          label: "查看",
+          props: "check",
+        },
+        {
+          label: "处理",
+          props: "edit",
+          visible: {
+            status: [0],
+          },
+        },
+      ],
+      //  表头配置
+      table_config: [
+        {
+          label: "序号",
+          props: "number",
+        },
+        {
+          label: "公司名称",
+          props: "cpmName",
+        },
+        {
+          label: "发起人",
+          props: "person",
+        },
+        {
+          label: "发起时间",
+          props: "createTime",
+          type: "date",
+        },
+        {
+          label: "状态",
+          props: "status",
+          type: "dictionary",
+          dictionary: { 0: "待办", 1: "已办" },
+        },
+      ],
+      // 模态框内表数据
+      table_list_approve:[],
+      table_loading_approve:false,
+      // 模态框内表头配置
+      table_config_approve:[
+        {
+          label: "编号",
+          props: "number",
+        },
+        {
+          label: "流程环节",
+          props: "cpmName",
+        },
+        {
+          label: "处理人",
+          props: "person",
+        },
+        {
+          label: "处理工号",
+          props: "number",
+        },
+        {
+          label: "处理时间",
+          props: "createTime",
+          type: "date",
+        },
+        {
+          label: "审批意见",
+          props: "status",
+          type: "dictionary",
+          dictionary: { 0: "同意", 1: "不同意" },
+        },
+      ]
+    };
+  },
+  methods: {
+    // 搜索事件
+    handleSearch(data) {
+      this.table_search = data;
+      this.page = 1;
+      this.handleInit({ ...data, page: this.page, pageSize: this.rows });
+    },
+    handleVisible(props) {
+      switch (props) {
+        case "add":
+          this.add_visible = !this.add_visible;
+          break;
+        case "summary":
+          this.summary_visible = !this.summary_visible;
+      }
+    },
+    // 查看按钮
+    handleCheck(row) {
+      console.log(row, "row");
+      // this.visible = true;
+      // this.edit_visible = false;
+      // this.edit_form = row;
+    },
+    // 编辑按钮
+    handleEdit() {},
+    handleAdd() {},
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.simple-container .el-form-item {
+  padding-bottom: 22px;
+}
+/deep/ .el-upload-dragger {
+  width: 608px;
+}
+.summary {
+  padding: 20px 50px 100px;
+  font-size: 16px;
+  .summary-tip {
+    color: #7f7f7f;
+    padding-top: 30px;
+  }
+}
+</style>

+ 7 - 0
src/router/index.js

@@ -1661,6 +1661,12 @@ const routes = [{
             name: 'busiTimeout',
             component: (resolve) => require( /* webpackChunkName: "system" */ ['../pages/main/busitime/busiTimeout'], resolve)
         },
+        {
+            meta: { name:  '工单列表', keepAlive: false },
+            path: '/workersList',
+            name: 'workersList',
+            component: (resolve) => require( /* webpackChunkName: "system" */['../pages/main/gridDivision/workersList.vue'], resolve)
+        },
     ]
 },
 {
@@ -1684,6 +1690,7 @@ router.beforeEach((to, from, next) => {
         // if (window.location.href.indexOf('?agileauthtoken=') == -1) {
         if (window.sessionStorage.agileauthtoken == undefined) {
             window.location.href = "http://10.230.26.15:8000/spfm/sysmgr/ssLogin?sysFlag=0";
+            // next()
             //window.location.href = "http://cas.hl.cmcc/cas/login?service=?service=http%3A%2F%2F10.230.26.15%3A8000%2Fspfm%2Fsysmgr%2FssLogin%3FsysFlag%3D0"
         } else {
             next()