Parcourir la source

Merge branch 'master_jzscsjdc' into 'master'

生产数据导出(省市)前端页面提交

See merge request spfm/spfm-market-front!445
徐兴安 il y a 2 ans
Parent
commit
f20eb76875

+ 240 - 0
src/components/uploadMultiConfig.vue

@@ -0,0 +1,240 @@
+<template>
+    <div v-loading="loading">
+        <el-upload class="upload-demo" :disabled ="disabled" :drag="drag" multiple :limit="fileInfo.limit" ref="upload"
+            action="string" :on-remove="handleRemove" :on-exceed="handleExceed" :file-list="fileList"
+             :auto-upload="true" :show-file-list="showFileList"
+            :before-upload="deforeUp" :http-request="signUpload" :on-preview = "downloadBack">
+            <div v-if="fileInfo.type !== 'btn' && !disabled">
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">点击上传</div>
+            </div>
+            <div v-if="fileInfo.type === 'btn' && !disabled">
+                <el-button :size="fileInfo.size?fileInfo.size:'medium'" :type="fileInfo.btntype">{{fileInfo.typename}}</el-button>
+            </div>
+        </el-upload>
+    </div>
+</template>
+<script>
+    export default {
+        props: ['fileInfo', 'fileList','type', 'drag','showFileList','disabled'],
+        data() {
+            return {
+                fileLists: [],
+                attList: [],
+                loading: false,
+                num: 0,
+                s: false
+            }
+        },
+        methods: {
+            signUpload(){},
+            //删除
+            handleRemove(file) {
+                for (let i = 0; i < this.attList.length; i++) {
+                    if (this.attList[i].fileName === file.name) {
+                        this.attList.splice(i, 1);
+                        this.$emit('uploadBack', this.attList)
+                    }
+                }
+            },
+            downloadBack(file) {
+                this.$emit('clickDownload', file)
+            },
+            //数量限制
+            handleExceed(files, fileList) {
+                this.$message.warning(
+                    `当前限制选择 ${this.fileInfo.limit} 个文件,本次选择了 ${files.length} 个文件,共选择了 ${files.length + fileList.length} 个文件`
+                );
+            },
+            deforeUp(file) {
+                const isLt2M = file.size / 1024 / 1024 < 100;
+                if (!isLt2M) {
+                    this.$message.error('上传文件大小不能超过 20MB!');
+                    return false
+                }
+                if(this.fileInfo.type == 'img'){
+                    const isImg = file.type.split("/")[0] == 'image';
+                    if (!isImg) {
+                        this.$message.error('请上传图片格式文件!');
+                        return false
+                    }
+                }
+                if(this.fileInfo.typexz == 'ppt'){
+                    const isImg = file.name.split(".")[1] == 'pptx';
+                    console.log(file.name.split(".")[1] == 'pptx')
+                    if (!isImg) {
+                        this.$message.error('请上传ppt格式文件!');
+                        return false
+                    }
+                }
+                if(this.fileInfo.typexz == 'csv'){
+                    const isImg = file.name.split(".")[1] == 'csv';
+                    if (!isImg) {
+                        this.$message.error('请上传csv格式文件!');
+                        return false
+                    }
+                }
+                if(this.fileInfo.typexz == 'xlsx'){
+                    const isImg = file.name.split(".")[1] == 'xlsx';
+                    if (!isImg) {
+                        this.$message.error('请上传xlsx格式文件!');
+                        return false
+                    }
+                }
+                this.loading = true;
+                let query = new FormData();
+                query.append("file", file);
+                if(this.fileInfo.typename == '新增素材'){
+                    query.append("advType", this.fileInfo.advType);
+                    query.append("advTypeName", this.fileInfo.advTypeName);
+                }
+                if(this.fileInfo.url == '/market/cIllegalCallTask/importTempByProv'||this.fileInfo.url == '/market/cChannelInfo/cIllegalCallTask/importTempByProv'){
+                    query.append("taskId", this.fileInfo.taskId);
+                    query.append("tempId", this.fileInfo.tempId);
+                }
+                //违规外呼
+                if(this.fileInfo.uploadType == 'outCall'){
+                    query.append("uploadType", 'outCall');
+                    query.append("relId", this.fileInfo.relId);
+                }
+                if(this.fileInfo.uploadType == 'train'){
+                    query.append("uploadType", 'train');
+                    query.append("relId", this.fileInfo.relId);
+                }
+                //运营类项目考核及结算
+                if(this.fileInfo.url == '/market/cmkAttachInfo/upload'){
+                    query.append("uploadType", this.fileInfo.uploadType);
+                }
+                if(this.fileInfo.url == '/market/cStoreOutWo/importData'){
+                    query.append("woNo", this.fileInfo.woNo);
+                }
+                if(this.fileInfo.url == '/market/cStoreScheTrainEva/importDataEva'){
+                    query.append("evaId", this.fileInfo.evaId);
+                }
+                this.num++;
+                let _this = this;
+                this.$http({
+                    url: this.fileInfo.url,
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: query,
+                }).then((res) => {
+                    if (this.fileInfo.type === 'btn') {
+                        this.$refs['upload'].clearFiles();
+                        this.$emit('uploadBack',res)
+                        if(res.data.result==0){
+                            this.$emit('onSuccess',file)
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'success'
+                            });
+                        }else if(res.data.result==1){
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'error'
+                            });
+                        }else if(res.data.result==2){
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'warning'
+                            });
+                        }else if(res.data.result==3){
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'info'
+                            });
+                        }else{
+                            _this.$message({
+                                message: res.data.desc,
+                                type: 'success'
+                            });
+                        }
+                        this.num--;
+                        if (this.num == 0) {
+                            this.loading = false;
+                        }
+                        return
+                    }
+                    if (this.fileInfo.type === 'voice') {
+                        this.attList = res.data;
+                    } else {
+                        this.attList.push({
+                            name:res.data.body.fileName,
+                            id: res.data.body.id,
+                            fileName: res.data.body.fileName,
+                            fileCode: res.data.body.fileCode,
+                            opName: res.data.body.opName,
+                            opNo: res.data.body.opNo,
+                            opTime: res.data.body.opTime,
+                            attchFileId: res.data.body.attchFileId,
+                            type: res.data.body.type,
+                        });
+                    }
+                    this.$emit('uploadBack', this.attList);
+                    this.num--;
+                    if (this.num == 0) {
+                        this.loading = false;
+                    }
+                    return true
+                }).catch((res) => {
+                    this.$message({
+                        message: file.name+'上传失败',
+                        type: 'error'
+                    });
+                    this.num--;
+                    if (this.num == 0) {
+                        this.loading = false;
+                    }
+                    for (let i = 0; i < this.$refs['upload'].uploadFiles.length; i++) {
+                        if(file.name == this.$refs['upload'].uploadFiles[i].name){
+                            this.$refs['upload'].uploadFiles.splice(i,1)
+                        }
+                    }
+                    return false
+                })
+            },
+        },
+        mounted() {
+
+        },
+        created() {
+            this.attList = [];
+            for (let i = 0; i < this.fileList.length; i++) {
+                this.attList.push({
+                    id: this.fileList[i].id,
+                    name:this.fileList[i].fileName,
+                    fileName: this.fileList[i].fileName,
+                    fileCode: this.fileList[i].fileCode,
+                    opName: this.fileList[i].opName,
+                    opNo: this.fileList[i].opNo,
+                    opTime: this.fileList[i].opTime,
+                    attchFileId: this.fileList[i].attchFileId,
+                    type: this.fileList[i].type,
+                })
+            }
+        },
+        watch: {
+            fileList() {
+                this.attList = [];
+                for (let i = 0; i < this.fileList.length; i++) {
+                    this.attList.push({
+                        id: this.fileList[i].id,
+                        name:this.fileList[i].fileName,
+                        fileName: this.fileList[i].fileName,
+                        fileCode: this.fileList[i].fileCode,
+                        opName: this.fileList[i].opName,
+                        opNo: this.fileList[i].opNo,
+                        opTime: this.fileList[i].opTime,
+                        attchFileId: this.fileList[i].attchFileId,
+                        type: this.fileList[i].type,
+                    })
+                }
+            }
+        }
+    }
+</script>
+<style scoped lang="scss">
+
+</style>

Fichier diff supprimé car celui-ci est trop grand
+ 1364 - 0
src/pages/main/productionDataExport/cityHome.vue


+ 113 - 0
src/pages/main/productionDataExport/form.vue

@@ -0,0 +1,113 @@
+<template>
+  <div>
+    <slot :name="list.name"></slot>
+    <el-table  ref="table" style="width: 100%" :data="list.data" :height="list.height + 'px'"
+      :max-height="list.height + 'px'" @row-click="getRowData" @selection-change="selectionChange"
+      :cell-style="columnbackgroundStyle" empty-text="暂无数据" @cell-click="getRowList">
+      <!-- 是否多选 -->
+      <el-table-column v-if="list.isSelection" :selecttable="list" type="selection" :width="100" align="center" />
+
+      <!-- 是否需要序号 -->
+      <el-table-column v-if="list.isIndex" type="index" label="序号" width="55" align="center" />
+      <template v-for="item in list.titledata">
+        <el-table-column :key="item.prop" :prop="item.prop" :label="item.label" align="center" show-overflow-tooltip
+          :width="item.width || 100" />
+      </template>
+      <!-- 操作列 -->
+      <el-table-column v-if="list.isOperation" v-bind="list.data && list.data.length ? { fixed: 'right' } : null"
+        style="margin-right: 20px" class-name="handle-td" label-class-name="tc" :label="list.operation.label"
+        align="center">
+        <!-- UI统一一排放3个,4个以上出现更多 -->
+        <template slot-scope="scope">
+          <!-- 三个一排的情况,去掉隐藏的按钮后的长度 -->
+          <template v-if="list.operation.data.length > 0">
+            <div class="btn">
+              <div v-for="item in list.operation.data" :key="item.label">
+                <template v-if="item.type !== 'icon'">
+                  <el-button v-bind="item" :type="item.type ? item.type : ''" size="mini" @click.native.prevent="
+                    item.handleRow(scope.$index, scope.row, item.label)
+                  ">
+                    {{ item.label }}
+                  </el-button>
+                </template>
+                <template v-else>
+                  <i :class="[icon, item.icon]" v-bind="item"
+                    @click="item.handleRow(scope.$index, scope.row, item.label)" />
+                </template>
+              </div>
+            </div>
+          </template>
+        </template>
+      </el-table-column>
+    </el-table>
+    <div class="page">
+      <el-pagination  style="display: flex; flex-direction: row-reverse;margin-bottom: 4%" v-if="list.pageData.total > 0"
+        :current-page.sync="page" :page-sizes="list.pageData.pageSizes ? list.pageData.pageSizes : [10]"
+        :page-size="list.pageData.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="list.pageData.total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      page: 1,
+    };
+  },
+  props: {
+    //  表格数据和表格部分属性的对象
+    // eslint-disable-next-line vue/require-default-prop
+    list: {
+      type: Object,
+    },
+  },
+  created() {
+    console.log(this.list);
+    // this.columnbackgroundStyle()
+  },
+  mounted() {
+    console.log(this.list);
+  },
+  methods: {
+    columnbackgroundStyle({ row, column, rowIndex, columnIndex }) {
+      if (column.type === 'default') {
+        if (column.label === '文件标题') {
+          return 'color:#0682CD;'
+        }
+      }
+    },
+    selectionChange(val) {
+      //多选数字回调
+      this.$emit("num", val);
+    },
+    handleAdd(name) {
+      this.$emit("toolMsg", name);
+    },
+    handleRow(index, row, lable) { },
+    handleSizeChange(val) {
+      this.$emit("changeSize", val);
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      this.$emit("changeNum", val);
+      console.log(`当前页: ${val}`);
+    },
+    // 点击行即可选中
+    getRowData(row) {
+      this.$refs.table.toggleRowSelection(row);
+    },
+    getRowList(row, column, event, cell) {
+      this.$emit("clickDemand", column.label, row);
+    },
+  },
+};
+</script>
+
+<style>
+.btn {
+  display: flex;
+  justify-content: center;
+}
+</style>

+ 604 - 0
src/pages/main/productionDataExport/formTable.vue

@@ -0,0 +1,604 @@
+<template>
+    <div>
+        <div>
+            <div class="flex-title">生产数据导出工单</div>
+            <el-form
+                ref="form"
+                :model="form"
+                :rules="rule"
+                label-width="130px"
+                style="margin-top: 30px"
+                :disabled="disabled"
+            >
+                <div class="flex-header">
+                    <el-form-item
+                        label="申请部门:"
+                        prop="applyDepartment"
+                        style="width: 25%; margin-right: 10px"
+                    >
+                        <el-input v-model="form.applyDepartment" :disabled="true"
+                        ></el-input>
+                    </el-form-item>
+
+                    <el-form-item
+                        label="申请科室:"
+                        prop="applyOffice"
+                        style="width: 25%; margin-right: 10px"
+                    >
+                        <el-input v-model="form.applyOffice" :disabled="true"
+                        ></el-input>
+                    </el-form-item>
+
+                    <el-form-item label="拟稿人:" prop="proposer" :disabled="true"
+                    >
+                        <el-input v-model="form.proposer" :disabled="true"></el-input>
+                    </el-form-item>
+                    <el-form-item label="拟稿时间:" prop="proposerTime"
+                    >
+                        <el-input
+                            v-model="form.proposerTime"
+                            :disabled="true"
+                        ></el-input>
+                    </el-form-item>
+                </div>
+
+                <div class="flex-header">
+                    <el-form-item
+                        label="文件标题:"
+                        prop="needName"
+                        style="width: 42%; margin-right: 10px"
+                    >
+                        <el-input v-model="form.needName" placeholder="关于XX单位导出XX业务XX数据的申请"></el-input>
+                    </el-form-item>
+
+                    <el-form-item label="文件编号:" prop="needNo"
+                                  style="width: 42%; margin-left: 11px"
+                    >
+                        <el-input v-model="form.needNo" :disabled="true"></el-input>
+                    </el-form-item>
+                </div>
+
+                <div class="flex-header">
+                    <el-form-item
+                        style="width: 33%; margin-right: 10%"
+                        label="联系电话:"
+                        prop="phoneNo"
+                    >
+                        <el-input v-model="form.phoneNo" :disabled="true"></el-input>
+                    </el-form-item>
+
+                    <el-form-item label="需求类型:" prop="requirementType"
+                                  style="width: 33%; margin-right: 10%"
+
+                    >
+                        <el-select v-model="form.requirementType" placeholder="需求类型">
+                            <el-option
+                                v-for="(item, index) in requirementTypeList"
+                                :label="item.name"
+                                :value="item.code"
+                                :key="index"
+                            >{{ item.name }}
+                            </el-option
+                            >
+                        </el-select>
+                    </el-form-item>
+
+                    <el-form-item label="数据导出类型:" prop="exportType"
+                                  style="width: 33%; margin-right: 10%"
+
+                    >
+                        <el-select v-model="form.exportType" placeholder="数据导出类型">
+                            <el-option
+                                v-for="(item, index) in exportTypeList"
+                                :label="item.name"
+                                :value="item.code"
+                                :key="index"
+                            >{{ item.name }}
+                            </el-option
+                            >
+                        </el-select>
+                    </el-form-item>
+                </div>
+
+
+                <div class="flex-header">
+                    <el-form-item
+                        label="数据库名:"
+                        style="width: 33%; margin-right: 10%"
+                        prop="sourceDatabase"
+                    >
+                        <el-input v-model="form.sourceDatabase"
+                                  placeholder="库名或IP"
+                        ></el-input>
+                    </el-form-item>
+
+                    <el-form-item label="数据表:" prop="sourceTable"
+                                  style="width: 33%; margin-right: 10%"
+
+                    >
+                        <el-input v-model="form.sourceTable" placeholder="用户.表名"></el-input>
+                    </el-form-item>
+
+                    <el-form-item label="主机IP:" prop="hostIp"
+                                  style="width: 33%; margin-right: 10%"
+
+                    >
+                        <el-input v-model="form.hostIp" placeholder="数据源所在主机IP"></el-input>
+                    </el-form-item>
+                </div>
+
+                <div class="flex-header">
+                    <el-form-item
+                        style="width: 90%; margin-right: 10%"
+                        label="导出文件名称:"
+                        prop="exportFileName"
+                    >
+                        <el-input v-model="form.exportFileName" placeholder="导出文件名称"></el-input>
+                    </el-form-item>
+                </div>
+                <div class="flex-header">
+                    <el-form-item
+                        style="width: 90%; margin-right: 10%"
+                        label="文件路径:"
+                        prop="exportFilePath"
+                    >
+                        <el-input v-model="form.exportFilePath"
+                                  placeholder="导出文件所在路径"
+                        ></el-input>
+                    </el-form-item>
+                </div>
+
+                <div class="flex-header">
+                    <el-form-item
+                        style="width: 90%; margin-right: 10%"
+                        label-width="120px" label="需求内容:"
+                        prop="requirementContent"
+                    >
+                        <el-input type="textarea"
+                                  show-word-limit v-model="form.requirementContent"
+                                  placeholder="如为明细级数据导出,请详细描述具体原由,至少50字。"
+                        ></el-input>
+                    </el-form-item>
+                </div>
+
+                <div class="flex-header">
+                    <el-form-item
+                        label="是否涉及敏感信息:"
+                        style="white-space: nowrap;margin-right: 10%"
+                        prop="isSensitiveInformation"
+                    >
+                        <el-select v-model="form.isSensitiveInformation" placeholder="请选择">
+                            <el-option label="是" value="是"></el-option>
+                            <el-option label="否" value="否"></el-option>
+                        </el-select>
+                    </el-form-item>
+                </div>
+                <div class="flex-header">
+                    <el-form-item
+                        style="width: 90%; margin-right: 10%"
+                        label-width="120px" label="涉敏信息范围:"
+                        prop="sensitiveScope"
+                    >
+                        <el-input type="textarea" @input="change($event)"
+                                  :disabled="this.isEditSensitiveScope"
+                                   v-model="form.sensitiveScope"></el-input>
+                    </el-form-item>
+                </div>
+
+                <div class="flex-load" style="display: flex; flex-direction: column">
+                    <el-form-item label="附件:" :disabled="disabled" prop="mkFileShareAttachList">
+                        <my-upload :showFileList ="true" :drag ="!disabled" :disabled ="disabled"  @uploadBack="uploadBack" @delloadBack="delloadBack"
+                                   @clickDownload="downloadOne" :fileInfo="fileInfo"
+                                   @downloadBack = "downloadBack"
+                                   :fileList="list.mkFileShareAttachList"
+                                   style="width: 30% !important"></my-upload>
+
+                    </el-form-item>
+                    <div @click="downExcel" class="el-upload__tip" slot="tip">
+                        附件模板: 生产数据导出申请表.doc
+                    </div>
+                </div>
+
+            </el-form>
+        </div>
+        <div></div>
+        <div></div>
+    </div>
+</template>
+
+<script>
+    import myUpload from "../../../components/uploadMultiConfig";
+
+    export default {
+        components: {
+            myUpload,
+        },
+        data() {
+            var validateRequirementContent = (rule, value, callback) => {
+                if (!this.disabled) {
+                    if (this.form.exportType === '2' && (!value || value.length < 50)) {
+                        callback(new Error('如为明细级数据导出,请详细描述具体原由,至少50字。'));
+                    } else if (!value) {
+                        callback(new Error('请输入需求内容'));
+                    } else {
+                        callback();
+                    }
+                } else {
+                    callback();
+                }
+            };
+
+            var validateSensitiveScope = (rule, value, callback) => {
+                if (!this.disabled) {
+                    if (this.form.isSensitiveInformation === "是") {
+                        if (!value) {
+                            callback(new Error('请输入涉敏信息范围'));
+                        } else {
+                            callback();
+                        }
+                    } else {
+                        callback();
+                    }
+                } else {
+                    callback();
+                }
+            };
+            return {
+                fileInfo: {
+                    type: "bt1n",
+                    typename: "上传文件",
+                    limit: 5,
+                    url: "/market/waf/upload",
+                    fileList: [],
+                },
+                //需求类型
+                requirementTypeList: [],
+                //数据导出类型
+                exportTypeList: [],
+                isEditSensitiveScope: false,
+
+                form: {
+                },
+                rule: {},
+                copyRule: {
+                    needName: [
+                        {required: true, message: "请输入文件标题", trigger: "blur"},
+                    ],
+                    requirementType: [
+                        {required: true, message: "请选择需求类型", trigger: "change"},
+                    ],
+                    exportType: [
+                        {required: true, message: "请选择数据导出类型", trigger: "change"},
+                    ],
+                    exportFileName: [
+                        {required: true, message: "请选择导出文件名称", trigger: "blur"},
+                    ],
+                    requirementContent: [
+                        {validator: validateRequirementContent, trigger: "blur"},
+                    ],
+                    isSensitiveInformation: [
+                        {required: true, message: "请选择是否涉及敏感信息", trigger: "change"},
+                    ],
+                    mkFileShareAttachList: [
+                        {required: true, message: "请选择上传附件", trigger: "change"},
+                    ],
+                    sensitiveScope: [
+                        {validator: validateSensitiveScope, trigger: 'blur'}
+                    ],
+                },
+                temprulers: {
+                    sensitiveScope: [
+                        {required: true, message: "请输入涉敏信息范围", trigger: "blur"},
+                    ],
+                }
+            };
+        },
+        props: {
+            list: {
+                type: Object,
+                default: () => {
+                },
+            },
+            disabled: {
+                type: Boolean,
+                default: () => {
+                },
+            },
+        },
+        mounted() {
+            if (this.list.mkFileShareAttachList) {
+                this.$refs.upload.attList = this.list.mkFileShareAttachList;
+                this.list.mkFileShareAttachList.map((item) => {
+                    item.name = item.fileName;
+                });
+            }
+        },
+        created() {
+            this.getRequirementTypeList();
+            this.getExportTypeList();
+            this.form = this.list;
+            this.isList = this.list;
+            if (!this.disabled) {
+                 this.rule = this.copyRule;
+            }
+            this.fileInfo.fileList = this.list.mkFileShareAttachList;
+        },
+        watch: {
+            "form.isSensitiveInformation": {
+                handler(newVal, oldVal) {
+                    if (!this.disabled) {
+                        if (newVal === "否") {
+                            this.isEditSensitiveScope = true;
+                            this.form.sensitiveScope = "";
+                        } else {
+                            this.isEditSensitiveScope = false;
+                        }
+                    }
+                },
+            },
+        },
+        methods: {
+            change(){
+                this.$forceUpdate();
+            },
+            getRequirementTypeList() {
+                this.$http({
+                    url: "/market/sysConfig/queryList",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {"type": "1"},
+                }).then((res) => {
+                    this.requirementTypeList = res.data;
+                });
+            },
+            getExportTypeList() {
+                this.$http({
+                    url: "/market/sysConfig/queryList",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: {"type": "2"},
+                }).then((res) => {
+                    this.exportTypeList = res.data;
+                });
+            },
+            clickLLength(e) {
+                if (e !== 0) {
+                    this.Length = true;
+                } else {
+                    this.Length = false;
+                }
+            },
+            clickSelect(e) {
+            },
+
+            uploadBack(v) {
+                if (v && v.fileName) {
+                    v.name = v.fileName;
+                }
+                if (this.form.mkFileShareAttachList) {
+                    this.form.mkFileShareAttachList = [];
+                    this.form.mkFileShareAttachList = v;
+                } else {
+                    let mkFileShareAttachList = [];
+                    mkFileShareAttachList = v;
+                    this.$set(this.form, "mkFileShareAttachList", mkFileShareAttachList);
+                }
+            },
+            downloadBack(v) {
+            },
+            delloadBack(v) {
+                this.form.mkFileShareAttachList = v;
+                this.$http({
+                    url: "/market/waf/update",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    data: this.form,
+                }).then((res) => {
+                });
+            },
+            downloadOne(e) {
+                let list = {
+                    id: e.fileCode,
+                    fileName: e.fileName,
+                };
+
+                this.$http({
+                    url: "/market/waf/downFile",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    responseType: "blob",
+                    data: list,
+                }).then((response) => {
+                    if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                        let blob = new Blob([response.data], {
+                            type: "application/vnd.ms-excel",
+                        });
+                        //window.navigator.msSaveOrOpenBlob(blob, this.form.needName);
+                        window.navigator.msSaveOrOpenBlob(
+                            blob,
+                            list.fileName
+                        );
+                    } else {
+                        /* 火狐谷歌的文件下载方式 */
+                        var blob = new Blob([response.data]);
+                        var downloadElement = document.createElement("a");
+                        var href = window.URL.createObjectURL(blob);
+                        downloadElement.href = href;
+                        downloadElement.download =
+                            list.fileName;
+                        document.body.appendChild(downloadElement);
+                        downloadElement.click();
+                        document.body.removeChild(downloadElement);
+                        window.URL.revokeObjectURL(href);
+                    }
+                });
+            },
+            download() {
+                if (this.form.mkFileShareAttachList.length > 1) {
+                    this.$http({
+                        url: "/market/CMKFile/downAllFile",
+                        method: "post",
+                        headers: {
+                            "Content-Type": "application/json",
+                        },
+                        responseType: "blob",
+                        data: {mkFileShareAttachList: this.form.mkFileShareAttachList},
+                    }).then((response) => {
+                        if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                            let blob = new Blob([response.data], {
+                                type: "application/vnd.ms-excel",
+                            });
+                            window.navigator.msSaveOrOpenBlob(
+                                blob,
+                                new Date().getTime().toString() + ".zip"
+                            );
+                        } else {
+                            /* 火狐谷歌的文件下载方式 */
+                            var blob = new Blob([response.data]);
+                            var downloadElement = document.createElement("a");
+                            var href = window.URL.createObjectURL(blob);
+                            downloadElement.href = href;
+                            downloadElement.download = this.form.needName + ".zip";
+                            document.body.appendChild(downloadElement);
+                            downloadElement.click();
+                            document.body.removeChild(downloadElement);
+                            window.URL.revokeObjectURL(href);
+                        }
+                        if (this.infolist.authType === "3") {
+                            this.dialogCli(10);
+                        }
+                    });
+                } else {
+                    let list = {
+                        id: this.form.mkFileShareAttachList[0].fileCode,
+                        fileName: this.form.mkFileShareAttachList[0].fileName,
+                    };
+                    this.$http({
+                        url: "/market/waf/downFile",
+                        method: "post",
+                        headers: {
+                            "Content-Type": "application/json",
+                        },
+                        responseType: "blob",
+                        data: list,
+                    }).then((response) => {
+                        if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                            let blob = new Blob([response.data], {
+                                type: "application/vnd.ms-excel",
+                            });
+                            //window.navigator.msSaveOrOpenBlob(blob, this.form.needName);
+                            window.navigator.msSaveOrOpenBlob(
+                                blob,
+                                this.form.mkFileShareAttachList[0].fileName
+                            );
+                        } else {
+                            /* 火狐谷歌的文件下载方式 */
+                            var blob = new Blob([response.data]);
+                            var downloadElement = document.createElement("a");
+                            var href = window.URL.createObjectURL(blob);
+                            downloadElement.href = href;
+                            downloadElement.download =
+                                this.form.mkFileShareAttachList[0].fileName;
+                            document.body.appendChild(downloadElement);
+                            downloadElement.click();
+                            document.body.removeChild(downloadElement);
+                            window.URL.revokeObjectURL(href);
+                        }
+                    });
+                }
+            },
+            //上传文件钩子函数
+            clickUpload(file) {
+            },
+            //下载文件
+            downExcel() {
+                this.$http({
+                    url: "/market/scsjdcProProcess/downloadTemp",
+                    method: "post",
+                    headers: {
+                        "Content-Type": "application/json",
+                    },
+                    responseType: "blob",
+                    data: {},
+                }).then((response) => {
+                    if (window.navigator && window.navigator.msSaveOrOpenBlob) {
+                        let blob = new Blob([response.data], {
+                            type: "application/vnd.ms-excel",
+                        });
+                        window.navigator.msSaveOrOpenBlob(blob, "生产数据导出申请表.doc");
+                    } else {
+                        /* 火狐谷歌的文件下载方式 */
+                        var blob = new Blob([response.data]);
+                        var downloadElement = document.createElement("a");
+                        var href = window.URL.createObjectURL(blob);
+                        downloadElement.href = href;
+                        downloadElement.download = "生产数据导出申请表.doc";
+                        document.body.appendChild(downloadElement);
+                        downloadElement.click();
+                        document.body.removeChild(downloadElement);
+                        window.URL.revokeObjectURL(href);
+                    }
+                });
+            },
+            changeSelect(e) {
+            },
+        },
+    };
+</script>
+
+<style lang="scss" scoped>
+    ::v-deep .el-upload-list {
+        width: 23rem;
+    }
+
+    .flex-title {
+        text-align: center;
+        font-size: 24px;
+        line-height: 60px;
+        border-bottom: 1px solid #e1e1e1;
+        font-weight: bold;
+    }
+
+    .flex-header {
+        margin-top: 20px;
+        display: flex;
+        //   justify-content: space-between;
+        border-bottom: 1px solid #e1e1e1;
+
+        ::v-deep .el-form-item {
+            width: 25%;
+            margin-right: 5%;
+        }
+    }
+
+    .flex-input-tare {
+        ::v-deep .el-form-item {
+            width: 100%;
+            margin-right: 5%;
+        }
+    }
+
+    .el-upload__tip {
+        color: red;
+    }
+
+    ::v-deep .el-input--suffix .el-input__inner {
+        width: 119% !important;
+    }
+
+    ::v-deep .el-input__inner {
+        color: black !important;
+    }
+
+    ::v-deep .el-textarea.is-disabled .el-textarea__inner {
+        color: black !important;
+    }
+</style>

Fichier diff supprimé car celui-ci est trop grand
+ 1370 - 0
src/pages/main/productionDataExport/provinceHome.vue


+ 16 - 2
src/router/index.js

@@ -2160,8 +2160,22 @@ const routes = [{
             name: 'processruns',
 
             component: resolve => require(['../pages/main/processruns/processruns.vue'], resolve),
-            meta: { title: '运行流程' }
-        }
+            meta: {title: '运行流程'}
+        },
+        {
+            meta: {name: '', keepAlive: false},
+            path: '/productionDataExportCityHome',
+            name: 'productionDataExportCityHome',
+            component: (resolve) => require( /* webpackChunkName: "system" */
+                ['../pages/main/productionDataExport/cityHome.vue'], resolve)
+        },
+        {
+            meta: {name: '', keepAlive: false},
+            path: '/productionDataExportProvinceHome',
+            name: 'productionDataExportProvinceHome',
+            component: (resolve) => require( /* webpackChunkName: "system" */
+                ['../pages/main/productionDataExport/provinceHome.vue'], resolve)
+        },
         , {
             meta: { name: '风险防控管理', keepAlive: false },
             path: '/riskMaterials',