Browse Source

重点攻坚渠道合作率

fan 3 years ago
parent
commit
9d8dd9ca00

File diff suppressed because it is too large
+ 363 - 0
public/static/views/kccExcel.html


+ 645 - 0
src/pages/main/keyChannelCoop/appendix.vue

@@ -0,0 +1,645 @@
+<template>
+    <div style="display: flex; justify-content: space-between">
+        <fullscreen :fullscreen.sync="fullscreen" class="container" style="margin: 0;width: 100%;">
+            <div class="container-box" style="padding: 0 20px 0 0;">
+                <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
+                <div style="overflow: hidden;">
+                    <div class="search" style="float: left;">
+                        <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
+                    </div>
+                    <div style="margin-top: 20px;float: right;" class="bigbtns">
+                    </div>
+                </div>
+                <div class="tabbox">
+                    <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
+                              tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
+                        <el-table-column prop="name" label="模板名称">
+                        </el-table-column>
+                        <el-table-column prop="opTime" label="创建时间">
+                        </el-table-column>
+                        <el-table-column label="操作" width="180px" align="center" fixed="right">
+                            <template slot-scope="scope">
+                                <el-button size="mini" type="primary" @click="appendixInfo(1,scope.row)">查看</el-button>
+                                <el-button size="mini" v-if="scope.row.finishStatus == 0" type="primary"
+                                           @click="appendixInfoAdd(1,scope.row)">处理
+                                </el-button>
+                                <el-button size="mini" v-if="scope.row.finishStatus == 0 && advInfo.isAdmin"
+                                           type="danger" @click="delLine(scope.row)">办结
+                                </el-button>
+                            </template>
+                        </el-table-column>
+                    </el-table>
+                    <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
+                                   :total="total">
+                    </el-pagination>
+                </div>
+
+                <el-dialog title="查看" :visible.sync="appendixInfoStatus" width="70%" :close-on-press-escape="false"
+                           :show-close="true" :before-close="closeAppendixInfoList" :destroy-on-close="true"
+                           :modal-append-to-body="false"
+                           :close-on-click-modal="false" :fullscreen="false">
+                    <div class="tabbox" style="height: 500px">
+                        <el-table height="calc(100% - 50px)" class="com-table" ref="multipleTable"
+                                  :data="appendixInfoData"
+                                  tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
+                            <el-table-column prop="appendixName" label="模板名称">
+                            </el-table-column>
+                            <el-table-column prop="cityName" label="地市">
+                            </el-table-column>
+                            <el-table-column prop="townName" label="区县">
+                            </el-table-column>
+                            <el-table-column prop="opName" label="上报人">
+                            </el-table-column>
+                            <el-table-column prop="opTime" label="创建时间">
+                            </el-table-column>
+                            <el-table-column label="操作" width="180px" align="center" fixed="right" v-if="appendixInfoFinishStatus == 0">
+                                <template slot-scope="scope">
+                                    <el-button size="mini" type="primary" @click="appendixInfoEdit(1,scope.row)">编辑
+                                    </el-button>
+                                    <el-button size="mini" type="danger" @click="appendixInfoDel(scope.row)">删除
+                                    </el-button>
+                                </template>
+                            </el-table-column>
+                        </el-table>
+                        <el-pagination class="pageBox" @current-change="appendixInfoListChange"
+                                       layout="prev, pager, next" background
+                                       :total="appendixInfoTotal">
+                        </el-pagination>
+                    </div>
+                    <div class="dialog-footer myfooter">
+                        <el-button v-if="advInfo.isAdmin" @click="exportZip()" type="primary">导 出</el-button>
+                        <el-button @click="appendixInfoStatus = false">关 闭</el-button>
+                    </div>
+                </el-dialog>
+
+                <el-dialog title="附件处理" :visible.sync="appendixInfoAddStatus" width="50%" :destroy-on-close="true"
+                           :modal-append-to-body="false" :close-on-click-modal="false">
+                    <div v-loading="loading">
+                        <el-form :model="appendixInfoList" ref="appendixInfoList" :rules="appendixInfoRules">
+                            <div class="info-line">
+                                <el-form-item prop="cityName">
+                                    <span>地市</span>
+                                    <el-input v-model="appendixInfoList.cityName" placeholder="地市"
+                                              :disabled="disableStatus"></el-input>
+                                </el-form-item>
+                                <el-form-item prop="townName">
+                                    <span>区县</span>
+                                    <el-input v-model="appendixInfoList.townName" placeholder="区县"
+                                              :disabled="disableStatus"></el-input>
+                                </el-form-item>
+                            </div>
+                            <div class="info-line">
+                                <el-form-item prop="agentName">
+                                    <span>渠道名称</span>
+                                    <el-input v-model="appendixInfoList.agentName" placeholder="渠道名称"
+                                              :disabled="disableStatus"></el-input>
+                                </el-form-item>
+                                <el-form-item prop="uploadUserName">
+                                    <span>上报人</span>
+                                    <el-input v-model="appendixInfoList.uploadUserName" placeholder="上报人"
+                                              :disabled="disableStatus"></el-input>
+                                </el-form-item>
+                            </div>
+                            <div style="padding-left: 80px" v-if="!disableStatus">
+                                <myUpload @uploadBack="uploadBack" :fileInfo="fileInfo"
+                                          :fileList="fileInfo.fileList"></myUpload>
+                            </div>
+                            <div style="padding:0 20px 0 100px" v-if="disableStatus">
+                                <uploadDown :datalist="datalist" :dialogStatus="uploadstatus"></uploadDown>
+                            </div>
+                            <div class="info-line">
+                                注:上传附件请以渠道名称命名
+                            </div>
+                        </el-form>
+                        <div slot="footer" class="dialog-footer myfooter">
+                            <el-button @click="saveAppendixInfo(1)" type="primary">保 存</el-button>
+                            <el-button @click="appendixInfoAddStatus = false">取 消</el-button>
+                        </div>
+                    </div>
+                </el-dialog>
+            </div>
+            <myMessage :messTit='messTit' @closeMessage="closeMessage" :centerDialogVisible="centerDialogVisible"
+                       v-if="centerDialogVisible"></myMessage>
+            <myMessage :messTit='appendixInfoDelTit' @closeMessage="appendixInfoDelCloseMessage"
+                       :centerDialogVisible="appendixInfoDelStatus" v-if="appendixInfoDelStatus"></myMessage>
+        </fullscreen>
+    </div>
+</template>
+<script>
+import mySearch from "../../../components/search.vue";
+import myUpload from "../../../components/upload";
+import toolList from "../../../components/toolList";
+import myMessage from "../../../components/myMessage.vue"
+
+export default {
+    components: {
+        myUpload,
+        mySearch,
+        toolList,
+        myMessage
+    },
+    data() {
+        const cityName = (rule, value, callback) => {
+            if (!this.appendixInfoList.cityName) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const townName = (rule, value, callback) => {
+            if (!this.appendixInfoList.townName) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const agentName = (rule, value, callback) => {
+            if (!this.appendixInfoList.agentName) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        const uploadUserName = (rule, value, callback) => {
+            if (!this.appendixInfoList.uploadUserName) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+
+        return {
+            appendixInfoRules: {
+                cityName: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: cityName
+                }],
+                townName: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: townName
+                }],
+                agentName: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: agentName
+                }],
+                uploadUserName: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: uploadUserName
+                }],
+            },
+            tooltit: '重点攻坚渠道合作率-附件统计',
+            searchList: [{
+                type: 'input',
+                tit: '名称',
+                value: '',
+                width: '100%',
+            },],
+            fullscreen: false,
+            total: 0,
+            pageSize: 1,
+            tableData: [{}],
+            dialogStatus: false,
+            disableStatus: false,
+            titname: '终端',
+            infolist: {},
+            typeOptions: [{
+                dataCode: 1,
+                dataName: 111,
+            }],
+            userInfo: {},
+            params: {},
+            termOption: [],
+            centerDialogVisible: false,
+            messTit: '',
+            delid: '',
+            loading: false,
+            attList: [],
+            uploadstatus: false,
+            fileInfo: {
+                limit: 50,
+                url: '/sysmgr/noticeatt/upload',
+                fileList: []
+            },
+            datalist: {
+                url: '/sysmgr/noticeatt/downfile',
+                type: 2,
+                attList: []
+            },
+            appendixInfoStatus: false,
+            appendixId: '',
+            appendixName:'',
+            appendixInfoData: [{}],
+            appendixInfoTotal: 0,
+            appendixInfoListPageSize: 1,
+            appendixInfoDelTit: '',
+            appendixInfoDelStatus: false,
+            appendixInfoDelId: '',
+            appendixInfoAddStatus: false,
+            appendixInfoList: {},
+            appendixInfoFinishStatus:'',
+            advInfo: {},
+        }
+    },
+    methods: {
+        //搜索数据
+        searchInfo(v) {
+            this.params = {};
+            v[0] ? this.params.name = v[0] : '';
+            this.getList(this.params, this.pageSize);
+        },
+        //获取列表
+        getList(v, n) {
+            this.pageSize = n;
+            this.loading = true;
+            this.tableData = [];
+            let _this = this;
+            this.$http({
+                url: "/market/keyChannelCoopAppendix/queryPage",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                    "page": '{"pageNo":"' + n + '","pageSize":"10"}'
+                },
+                data: v,
+            }).then((res) => {
+                this.tableData = res.data.data;
+                this.total = res.data.totalRecord;
+                this.loading = false;
+            });
+        },
+        //获取列表
+        getAppendixInfoList(v, n) {
+            this.appendixInfoListPageSize = n;
+            this.loading = true;
+            this.appendixInfoData = [];
+            let _this = this;
+            this.$http({
+                url: "/market/cKeyChannelCoopAppendix/queryAppendixInfoPage",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                    "page": '{"pageNo":"' + n + '","pageSize":"10"}'
+                },
+                data: {
+                    appendixId: this.appendixId
+                },
+            }).then((res) => {
+                this.appendixInfoData = res.data.data;
+                this.appendixInfoTotal = res.data.totalRecord;
+                this.loading = false;
+            });
+        },
+        // 分页
+        currchange(v) {
+            this.pageSize = v;
+            this.getList(this.params, this.pageSize);
+        },
+        appendixInfoListChange(v) {
+            this.pageSize = v;
+            this.getAppendixInfoList(null, this.appendixInfoListPageSize)
+
+        },
+        //查看
+        appendixInfo(v, n) {
+            this.appendixId = n.id;
+            this.appendixName = n.name;
+            this.appendixInfoFinishStatus = n.finishStatus;
+            //获取列表数据
+            this.getAppendixInfoList(1, this.appendixInfoListPageSize)
+            this.appendixInfoStatus = true;
+
+        },
+        //删除
+        delLine(v) {
+            this.centerDialogVisible = true;
+            this.messTit = '是否确认办结?';
+            this.delid = v.id;
+        },
+        closeMessage(v) {
+            this.centerDialogVisible = false;
+            let _this = this;
+            if (v === 1) {
+                this.$http({
+                    url: "/market/cKeyChannelCoopAppendix/finishAppendix",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        id: this.delid
+                    },
+                }).then((res) => {
+                    if (res.data.result === 1) {
+                        _this.$message({
+                            message: res.data.desc,
+                            type: 'error'
+                        });
+                    } else {
+                        _this.$message({
+                            message: '办结成功',
+                            type: 'success'
+                        });
+                        _this.getList(this.params, this.pageSize);
+                    }
+                });
+            }
+        },
+        appendixInfoDel(v) {
+            this.appendixInfoDelStatus = true;
+            this.appendixInfoDelTit = '是否确认删除?';
+            this.appendixInfoDelId = v.id;
+        },
+        appendixInfoDelCloseMessage(v) {
+            this.appendixInfoDelStatus = false;
+            let _this = this;
+            if (v === 1) {
+                this.$http({
+                    url: "/market/cKeyChannelCoopAppendix/delAppendixInfo",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        id: this.appendixInfoDelId
+                    },
+                }).then((res) => {
+                    if (res.data.result === 1) {
+                        _this.$message({
+                            message: res.data.desc,
+                            type: 'error'
+                        });
+                    } else {
+                        _this.$message({
+                            message: '删除成功',
+                            type: 'success'
+                        });
+                        _this.getAppendixInfoList(null, this.pageSize);
+                    }
+                });
+            }
+        },
+        //查看
+        appendixInfoAdd(v, n) {
+            this.appendixInfoList = {
+                cityName: "",
+                uploadUserName: "",
+                agentName: "",
+                townName: "",
+                appendixId: n.id,
+                appendixName: n.name
+            };
+            this.disableStatus = false;
+            var adv = this.advInfo;
+            this.appendixInfoList.cityName = adv.cityName;
+            this.appendixInfoList.uploadUserName = adv.userName;
+            this.appendixInfoAddStatus = true;
+        },
+        appendixInfoEdit(v, n) {
+            var _this = this;
+            //获取文件列表
+            this.$http({
+                url: '/market/cKeyChannelCoopAppendix/queryAppendixFilesList',
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    appendixInfoId: n.id,
+                },
+            }).then((res) => {
+                if (res.data.result === 1) {
+                    _this.$message({
+                        message: res.data.desc,
+                        type: 'error'
+                    });
+                } else {
+                    console.log(res.data);
+                    //显示文件列表
+                    this.datalist.attList = res.data;
+                    this.attList = [];
+                    this.fileInfo.fileList = [];
+                    res.data.forEach(item => {
+                        this.fileInfo.fileList.push({
+                            name: item.fileName,
+                            id: item.id,
+                            fileName: item.fileName,
+                            fileCode: item.fileCode,
+                            opName:item.opName,
+                            opNo: item.opNo,
+                            opTime: item.opTime
+                        });
+                        this.attList.push({
+                            name: item.fileName,
+                            id: item.id,
+                            fileName: item.fileName,
+                            fileCode: item.fileCode,
+                            opName:item.opName,
+                            opNo: item.opNo,
+                            opTime: item.opTime
+                        });
+                    })
+                    this.appendixInfoList = Object.assign({}, n); //拷贝
+                    this.appendixInfoAddStatus = true;
+                }
+            });
+
+        },
+        saveAppendixInfo(v) {
+            let _this = this;
+            _this.appendixInfoList.opNo = _this.userInfo.loginNo;
+            _this.appendixInfoList.opName = _this.userInfo.loginName;
+            _this.appendixInfoList.opTime = _this.$formatDate(new Date(), 'YYYY-MM-DD HH:mm:ss');
+            if (v === 1) {
+                this.submitAppendixInfo("/market/cKeyChannelCoopAppendix/addAppendixInfo");
+            }
+        },
+        submitAppendixInfo(u) {
+            let _this = this;
+            this.$refs.appendixInfoList.validate(valid => {
+                if (valid) {
+                    this.$http({
+                        url: u,
+                        method: "post",
+                        headers: {
+                            "Content-Type": "application/json",
+                        },
+                        data: {
+                            appendixInfo: _this.appendixInfoList,
+                            filesList: _this.attList
+                        },
+                    }).then((res) => {
+                        if (res.data.result === 1) {
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'error'
+                            });
+                        } else {
+                            _this.$message({
+                                message: '成功',
+                                type: 'success'
+                            });
+                            _this.fileInfo.fileList = [];
+                            _this.attList = [];
+                            _this.appendixInfoAddStatus = false;
+                        }
+                    });
+                }
+            })
+        },
+        //功能栏
+        iconCli(v) {
+            if (v === 1) {
+                this.getList(this.params, this.pageSize);
+            }
+            if (v === 2) {
+                this.fullscreen = !this.fullscreen
+            }
+        },
+        getUser() {
+            this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+            this.infolist = {
+                opNo: '',
+                opName: '',
+            };
+            this.infolist.opNo = this.userInfo.loginNo;
+            this.infolist.opName = this.userInfo.loginName;
+        },
+        closeAppendixInfoList() {
+            this.appendixInfoStatus = false;
+        },
+        //文件返回值
+        uploadBack(v) {
+            this.attList = v;
+        },
+        getAdvUserInfo() {
+            this.$http({
+                url: "/market/cKeyChannelCoopExcel/getUserInfo",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+            }).then((res) => {
+                if (res.data.result !== 1) {
+                    this.advInfo = res.data.body;
+                }
+            });
+        },
+        exportZip() {
+            let _this = this;
+            let param = new FormData();
+            param.append("id",_this.appendixId);
+            _this.$http({
+                url: '/market/cKeyChannelCoopAppendix/downloadAppendixZip',
+                method: "post",
+                responseType: 'blob',
+                headers: {
+                    "Content-Type": "application/json",
+                },
+                data: {
+                    id:_this.appendixId
+                },
+            }).then(res => {
+                if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                    let blob = new Blob([res.data], {
+                        type: "application/x-msdownload"
+                    });
+                    window.navigator.msSaveOrOpenBlob(
+                        blob,
+                        // this.wo.bizName + ".xlsx"
+                        this.appendixName + ".zip"
+                    );
+                } else {
+                    /* 火狐谷歌的文件下载方式 */
+                    var blob = new Blob([res.data]);
+                    var downloadElement = document.createElement("a");
+                    var href = window.URL.createObjectURL(blob);
+                    downloadElement.href = href;
+                    downloadElement.download = this.appendixName + ".zip";
+                    document.body.appendChild(downloadElement);
+                    downloadElement.click();
+                    document.body.removeChild(downloadElement);
+                    window.URL.revokeObjectURL(href);
+                }
+            });
+        }
+    },
+    mounted() {
+        this.getAdvUserInfo();
+        this.getList({}, 1);
+        this.getUser();
+    },
+    created() {
+
+    }
+}
+</script>
+<style scoped lang="scss">
+.titbox {
+    div {
+        float: right;
+
+        i {
+            font-size: 22px;
+            margin-left: 20px;
+            cursor: pointer;
+        }
+    }
+}
+
+.tabbox {
+    margin-top: 16px;
+}
+
+.pageBox {
+    text-align: right;
+    margin-top: 10px;
+}
+
+.info-line {
+    width: 100%;
+    display: block;
+    padding-left: 20px;
+
+    div {
+        width: 50%;
+        display: inline-block;
+    }
+
+    span {
+        width: 80px;
+        display: inline-block;
+        text-align: left;
+
+        i {
+            color: red;
+            display: inline-block;
+            padding-right: 5px;
+        }
+    }
+
+    .el-select,
+    .el-input {
+        width: calc(100% - 100px);
+    }
+}
+
+.online {
+    width: 100%;
+
+    .el-select {
+        width: calc(100% - 100px);
+    }
+
+    span {
+        vertical-align: top;
+    }
+
+    .el-textarea {
+        width: calc(100% - 100px);
+    }
+}
+</style>

+ 74 - 0
src/pages/main/keyChannelCoop/home.vue

@@ -0,0 +1,74 @@
+<template>
+    <div class="inner-container">
+        <el-col :span="3">
+            <el-tabs
+                tab-position="left"
+                v-model="activeName"
+                @tab-click="handleClick">
+                <el-tab-pane
+                    v-for="(item, index) in routerList"
+                    :key="index"
+                    :name="item.path"
+                    :label="item.label">
+                </el-tab-pane>
+            </el-tabs>
+        </el-col>
+        <el-col :span="21" style="background: #f4f4f4;">
+            <div style="height: 100%">
+                <router-view/>
+            </div>
+        </el-col>
+    </div>
+</template>
+<script>
+export default {
+    data() {
+        return {
+            activeName: "",
+            showList: [],
+            routerList: [
+                {label: "在线表格", path: "/onlineExcel", name: "onlineExcel"},
+                {label: "附件统计", path: "/appendix", name: "appendix"},
+            ],
+        };
+    },
+    computed: {
+        menuList: function () {
+            let arr = [];
+            this.routerList.map((item) => {
+                this.showList.map((row) => {
+                    if (item.path == row) {
+                        arr.push(item);
+                    }
+                });
+            });
+            return arr;
+        },
+    },
+    methods: {
+        handleClick(val) {
+            if (this.$route.path != this.activeName) {
+                this.$router.push(this.activeName);
+            }
+        },
+    },
+    mounted() {
+        this.activeName = this.$route.path;
+    },
+    created() {
+        JSON.parse(sessionStorage.childrenMenus).map((item) => {
+            this.showList.push(item.jspUrl);
+        });
+    },
+    watch: {
+        $route(to, from) {
+            this.activeName = this.$route.path;
+        },
+    },
+};
+</script>
+<style>
+.el-tabs__content {
+    display: none;
+}
+</style>

+ 385 - 0
src/pages/main/keyChannelCoop/onlineExcel.vue

@@ -0,0 +1,385 @@
+<template>
+    <fullscreen :fullscreen.sync="fullscreen" class="container" style="margin: 0;width: 100%;">
+        <div class="container-box" style="padding: 0 20px 0 0;">
+            <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
+            <div style="overflow: hidden;">
+                <div class="search" style="float: left;">
+                    <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
+                </div>
+                <div style="margin-top: 20px;float: right;" class="bigbtns">
+                    <el-button style="margin-left: 20px;" class="btn-check" size="medium" type="primary" v-if="advInfo.isAdmin" @click="dialogCheck(1)">新建
+                    </el-button>
+                </div>
+            </div>
+            <div class="tabbox">
+                <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
+                          tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
+                    <el-table-column prop="name" label="模板名称">
+                    </el-table-column>
+                    <el-table-column prop="opTime" label="创建时间">
+                    </el-table-column>
+                    <el-table-column label="操作" width="180px" align="center" fixed="right">
+                        <template slot-scope="scope">
+                            <el-button size="mini" type="primary" @click="jumpinfop('/onlineExcelInfo',1,'在线表格查看',scope.row)">查看</el-button>
+                            <el-button size="mini" v-if="scope.row.finishStatus == 0" type="primary" @click="jumpinfop('/onlineExcelInfo',2,'在线表格处理',scope.row)">处理</el-button>
+                            <el-button size="mini" v-if="scope.row.finishStatus == 0 && advInfo.isAdmin" type="danger" @click="delLine(scope.row)">办结</el-button>
+                        </template>
+                    </el-table-column>
+                </el-table>
+                <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
+                               :total="total">
+                </el-pagination>
+            </div>
+            <el-dialog :title="'新增表格模板'" :visible.sync="dialogStatus" width="50%" :destroy-on-close="true"
+                       :modal-append-to-body="false" :close-on-click-modal="false">
+                <div v-loading="loading">
+                    <el-form :model="infolist" ref="infolist" :rules="rules">
+                        <div class="online">
+                            <el-form-item prop="name">
+                                <span>模板名称</span>
+                                <el-input v-model="infolist.name" placeholder="模板名称" :disabled="disableStatus"></el-input>
+                            </el-form-item>
+                        </div>
+                    </el-form>
+                    <div slot="footer" class="dialog-footer myfooter">
+                        <el-button type="primary" @click="dialogCli(2)" v-if="titname !== '查看'">确 定</el-button>
+                        <el-button @click="dialogCli(1)" v-if="titname === '查看'">确 定</el-button>
+                        <el-button @click="dialogCli(1)">取 消</el-button>
+                    </div>
+                </div>
+            </el-dialog>
+        </div>
+        <myMessage :messTit='messTit' @closeMessage="closeMessage" :centerDialogVisible="centerDialogVisible" v-if="centerDialogVisible"></myMessage>
+    </fullscreen>
+</template>
+<script>
+import mySearch from "../../../components/search.vue";
+import myUpload from "../../../components/upload";
+import toolList from "../../../components/toolList";
+import myMessage from "../../../components/myMessage.vue"
+
+export default {
+    components: {
+        myUpload,
+        mySearch,
+        toolList,
+        myMessage
+    },
+    data() {
+        const name = (rule, value, callback) => {
+            if (!this.infolist.name) {
+                callback(new Error('不能为空'))
+            } else {
+                callback()
+            }
+        }
+        return {
+            rules: {
+                name: [{
+                    required: true,
+                    trigger: 'change',
+                    validator: name
+                }],
+            },
+            tooltit: '重点攻坚渠道合作率-在线表格',
+            searchList: [{
+                type: 'input',
+                tit: '名称',
+                value: '',
+                width: '100%',
+            },],
+            fullscreen: false,
+            total: 0,
+            pageSize: 1,
+            tableData: [{}],
+            dialogStatus: false,
+            disableStatus: false,
+            titname: '终端',
+            infolist: {},
+            typeOptions: [{
+                dataCode: 1,
+                dataName: 111,
+            }],
+            userInfo: {},
+            params: {},
+            termOption: [],
+            centerDialogVisible: false,
+            messTit: '',
+            delid: '',
+            loading: false,
+            advInfo: {},
+        }
+    },
+    methods: {
+        //搜索数据
+        searchInfo(v) {
+            this.params = {};
+            v[0] ? this.params.name = v[0] : '';
+            this.getList(this.params, this.pageSize);
+        },
+        //获取列表
+        getList(v, n) {
+            this.pageSize = n;
+            this.loading = true;
+            this.tableData = [];
+            let _this = this;
+            this.$http({
+                url: "/market/keyChannelCoopExcel/queryPage",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                    "page": '{"pageNo":"' + n + '","pageSize":"10"}'
+                },
+                data: v,
+            }).then((res) => {
+                this.tableData = res.data.data;
+                this.total = res.data.totalRecord;
+                this.loading = false;
+            });
+        },
+        // 分页
+        currchange(v) {
+            this.pageSize = v;
+            this.getList(this.params, this.pageSize);
+        },
+        //查看
+        dialogCheck(v, n) {
+            this.dialogStatus = true;
+            this.disableStatus = false;
+            if (v === 1) {
+                this.titname = '新建';
+                this.getUser();
+                return
+            } else if (v === 2) {
+                this.titname = '查看';
+                this.disableStatus = true;
+            } else if (v === 3) {
+                this.titname = '修改';
+                this.loading = true;
+            }
+            this.infolist = Object.assign({}, n); //拷贝
+            this.infolist.opNo = this.userInfo.loginNo;
+            this.infolist.opName = this.userInfo.loginName;
+            this.loading = false;
+        },
+        //修改  添加
+        dialogCli(v) {
+            if (v === 1) {
+                this.infolist = {};
+                this.dialogStatus = false;
+                return
+            }
+            this.infolist.opTime = this.$formatDate(new Date(), 'YYYY-MM-DD HH:mm:ss');
+            this.infolist.finishStatus = 0;
+            if (this.titname === '新建') {
+                this.submitInfo("/market/cKeyChannelCoopExcel/add", v);
+            } else if (this.titname === '修改') {
+                this.submitInfo("/market/keyChannelCoopExcel/update", v);
+            }
+        },
+        submitInfo(u, v) {
+            let _this = this;
+            this.$refs.infolist.validate(valid => {
+                if (valid) {
+                    this.$http({
+                        url: u,
+                        method: "post",
+                        headers: {
+                            "Content-Type": "application/json",
+                        },
+                        data: this.infolist,
+                    }).then((res) => {
+                        if (res.data.result === 1) {
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'error'
+                            });
+                        } else {
+                            _this.$message({
+                                message: '成功',
+                                type: 'success'
+                            });
+                            _this.infolist = {};
+                            console.log(_this.infolist);
+                            _this.dialogStatus = false;
+                            _this.getList({}, _this.pageSize);
+                        }
+
+                    });
+                }
+            })
+        },
+        //删除
+        delLine(v) {
+            this.centerDialogVisible = true;
+            this.messTit = '是否确认办结?';
+            this.delid = v.id;
+        },
+        closeMessage(v) {
+            this.centerDialogVisible = false;
+            let _this = this;
+            if (v === 1) {
+                this.$http({
+                    url: "/market/cKeyChannelCoopExcel/finishExcel",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {
+                        id: this.delid
+                    },
+                }).then((res) => {
+                    if (res.data.result === 1) {
+                        _this.$message({
+                            message: res.data.desc,
+                            type: 'error'
+                        });
+                    } else {
+                        _this.$message({
+                            message: '办结成功',
+                            type: 'success'
+                        });
+                        _this.getList(this.params, this.pageSize);
+                    }
+                });
+            }
+        },
+        //功能栏
+        iconCli(v) {
+            if (v === 1) {
+                this.getList(this.params, this.pageSize);
+            }
+            if (v === 2) {
+                this.fullscreen = !this.fullscreen
+            }
+        },
+        getUser() {
+            this.userInfo = JSON.parse(window.sessionStorage.userInfo);
+            this.infolist = {
+                opNo: '',
+                opName: '',
+            };
+            this.infolist.opNo = this.userInfo.loginNo;
+            this.infolist.opName = this.userInfo.loginName;
+        },
+        jumpinfop(p,v,n,row){
+            console.log(row);
+            this.$router.push({
+                path: p,
+                query:{
+                    type:v,
+                    id:row.id
+                }
+            });
+            this.setabList(n, p + '?type='+ v + '&id=' + row.id);
+        },
+        setabList(n, p) {
+            let params = {
+                children: "",
+                name: n,
+                rountPath: p,
+                target: "_self",
+            };
+            for (let i = 0; i < this.$store.state.tabList.length; i++) {
+                if (this.$store.state.tabList[i].name === params.name) {
+                    this.$store.state.tabList[i] = params;
+                }
+            }
+            let set = new Set([...this.$store.state.tabList, params]);
+            set.add(params);
+            this.$store.commit("setDefaultActive", params.rountPath);
+            this.$store.commit("setTabList", Array.from(set));
+        },
+        getAdvUserInfo() {
+            console.log("getAdvUserInfo");
+            this.$http({
+                url: "/market/cKeyChannelCoopExcel/getUserInfo",
+                method: "post",
+                headers: {
+                    "Content-Type": "application/json",
+                },
+            }).then((res) => {
+                if (res.data.result !== 1) {
+                    console.log(res);
+                    this.advInfo = res.data.body;
+                    console.log(this.advInfo);
+                }
+            });
+        }
+    },
+    mounted() {
+        this.getAdvUserInfo();
+        this.getList({}, 1);
+        this.getUser();
+    },
+    created() {
+
+    }
+}
+</script>
+<style scoped lang="scss">
+.titbox {
+    div {
+        float: right;
+
+        i {
+            font-size: 22px;
+            margin-left: 20px;
+            cursor: pointer;
+        }
+    }
+}
+
+.tabbox {
+    margin-top: 16px;
+}
+
+.pageBox {
+    text-align: right;
+    margin-top: 10px;
+}
+
+.info-line {
+    width: 100%;
+    display: block;
+    padding-left: 20px;
+
+    div {
+        width: 50%;
+        display: inline-block;
+    }
+
+    span {
+        width: 80px;
+        display: inline-block;
+        text-align: left;
+
+        i {
+            color: red;
+            display: inline-block;
+            padding-right: 5px;
+        }
+    }
+
+    .el-select,
+    .el-input {
+        width: calc(100% - 100px);
+    }
+}
+
+.online {
+    width: 100%;
+
+    .el-select {
+        width: calc(100% - 100px);
+    }
+
+    span {
+        vertical-align: top;
+    }
+
+    .el-textarea {
+        width: calc(100% - 100px);
+    }
+}
+</style>

+ 16 - 0
src/pages/main/keyChannelCoop/onlineExcelInfo.vue

@@ -0,0 +1,16 @@
+<template>
+    <div class="container" id="container">
+        <iframe height="100%" width="100%" src="/static/views/kccExcel.html" frameborder="0"></iframe>
+    </div>
+</template>
+<style scoped>
+.containerr {
+    background: #fff;
+    height: calc(100vh);
+    width: calc(100vw);
+    position: fixed;
+    left: 0;
+    top: 0;
+    overflow: hidden;
+}
+</style>

+ 31 - 0
src/router/index.js

@@ -1745,6 +1745,37 @@ const routes = [{
             name: 'redir',
             component: (resolve) => require( /* webpackChunkName: "system" */ ['../pages/main/redir/redir'], resolve)
         },
+        {
+            meta: { name:  '重点攻坚渠道合作率', keepAlive: false },
+            path: '/keyChannelHome',
+            name: 'keyChannelHome',
+            redirect: 'onlineExcel',
+            component: (resolve) => require( /* webpackChunkName: "system" */
+                ['../pages/main/keyChannelCoop/home.vue'], resolve),
+            children: [
+                {
+                    meta: { name:  '在线表格', keepAlive: false },
+                    path: '/onlineExcel',
+                    name: 'onlineExcel',
+                    component: (resolve) => require( /* webpackChunkName: "system" */['../pages/main/keyChannelCoop/onlineExcel'], resolve)
+                },
+                {
+                    meta: { name:  '附件统计', keepAlive: false },
+                    path: '/appendix',
+                    name: 'appendix',
+                    component: (resolve) => require( /* webpackChunkName: "system" */['../pages/main/keyChannelCoop/appendix'], resolve)
+                },
+            ]
+        },
+        {
+            meta: {
+                name: '在线表格详情',
+                keepAlive: false
+            },
+            path: '/onlineExcelInfo',
+            name: 'onlineExcelInfo',
+            component: (resolve) => require( /* webpackChunkName: "system" */ ['../pages/main/keyChannelCoop/onlineExcelInfo'], resolve)
+        },
 
     ]
 },