导入用户

This commit is contained in:
2024-07-23 11:26:55 +08:00
parent b500a532b1
commit ffe52038bb
12 changed files with 77 additions and 59 deletions

View File

@@ -5,14 +5,14 @@
<breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/>
<top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/>
<div class="right-menu">
<template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item"/>
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
<!-- <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
<!-- </el-tooltip>-->
<!-- <el-tooltip content="源码地址" effect="dark" placement="bottom">-->
<!-- <ruo-yi-git id="ruoyi-git" class="right-menu-item hover-effect" />-->
<!-- </el-tooltip>-->
<el-tooltip content="操作手册" effect="dark" placement="bottom">
<ruo-yi-doc id="ruoyi-doc" class="right-menu-item hover-effect"/>
@@ -44,6 +44,7 @@
</el-dropdown-menu>
</el-dropdown>
</div>
<div class="right-menu" style="color: red;">非涉密系统,切勿上传涉密信息!</div>
</div>
</template>

View File

@@ -223,9 +223,9 @@
<!-- </div>-->
<div style="margin-top: 10px">
<span>仅允许导入json格式文件</span>
<el-link type="primary" style="font-size:12px;vertical-align: baseline;"
:href='importTemplate'>下载模板
</el-link>
<!-- <el-link type="primary" style="font-size:12px;vertical-align: baseline;"-->
<!-- :href='importTemplate'>下载模板-->
<!-- </el-link>-->
</div>
</div>
</el-upload>
@@ -240,6 +240,7 @@
<script>
import { listTask, getTask, delTask, addTask, updateTask } from "@/api/cxxm/zftk/task";
import {getToken} from "@/utils/auth";
import {Loading} from "element-ui";
export default {
name: "Task",
@@ -468,6 +469,7 @@ export default {
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
Loading.service({fullscreen: true, text: "导入中..."}).close();
if (response.code === 500) {
this.$modal.msgError(response.msg);
}
@@ -498,6 +500,7 @@ export default {
this.$message.error("请选择任务类型!")
} else {
this.$refs.upload.submit();
Loading.service({fullscreen: true, text: "导入中..."});
}
},
//判断是否可勾选

View File

@@ -232,9 +232,9 @@
<!-- </div>-->
<div style="margin-top: 10px">
<span>仅允许导入json格式文件</span>
<el-link type="primary" style="font-size:12px;vertical-align: baseline;"
:href='importTemplate'>下载模板
</el-link>
<!-- <el-link type="primary" style="font-size:12px;vertical-align: baseline;"-->
<!-- :href='importTemplate'>下载模板-->
<!-- </el-link>-->
</div>
</div>
</el-upload>
@@ -249,6 +249,7 @@
<script>
import { listTask, getTask, delTask, addTask, updateTask } from "@/api/cxxm/zt/task";
import {getToken} from "@/utils/auth";
import {Loading} from "element-ui";
export default {
name: "Task",
@@ -479,6 +480,7 @@ export default {
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
Loading.service({fullscreen: true, text: "导入中..."}).close();
if (response.code === 500) {
this.$modal.msgError(response.msg);
}
@@ -509,6 +511,7 @@ export default {
this.$message.error("请选择任务类型!")
} else {
this.$refs.upload.submit();
Loading.service({fullscreen: true, text: "导入中..."});
}
},
/** 自定义编号 */

View File

@@ -234,9 +234,9 @@
<!-- </div>-->
<div style="margin-top: 10px">
<span>仅允许导入json格式文件</span>
<el-link type="primary" style="font-size:12px;vertical-align: baseline;"
:href='importTemplate'>下载模板
</el-link>
<!-- <el-link type="primary" style="font-size:12px;vertical-align: baseline;"-->
<!-- :href='importTemplate'>下载模板-->
<!-- </el-link>-->
</div>
</div>
</el-upload>
@@ -251,6 +251,7 @@
<script>
import {listTask, getTask, delTask, addTask, updateTask} from "@/api/cxxm/zttb/task";
import {getToken} from "@/utils/auth";
import {Loading} from "element-ui";
export default {
name: "Task",
@@ -481,6 +482,7 @@ export default {
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
Loading.service({fullscreen: true, text: "导入中..."}).close();
if (response.code === 500) {
this.$modal.msgError(response.msg);
}
@@ -511,6 +513,7 @@ export default {
this.$message.error("请选择任务类型!")
} else {
this.$refs.upload.submit();
Loading.service({fullscreen: true, text: "导入中..."});
}
},
/** 自定义编号 */

View File

@@ -367,10 +367,10 @@
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em></div>
<div class="el-upload__tip text-center" slot="tip">
<!-- <div class="el-upload__tip" slot="tip">-->
<!-- <el-checkbox v-model="upload.updateSupport"/>-->
<!-- 是否更新已经存在的用户数据-->
<!-- </div>-->
<!-- <div class="el-upload__tip" slot="tip">-->
<!-- <el-checkbox v-model="upload.updateSupport"/>-->
<!-- 是否更新已经存在的用户数据-->
<!-- </div>-->
<span>仅允许导入xlsxlsx格式文件</span>
<el-link type="primary" :underline="false" style="font-size:12px;vertical-align: baseline;"
@click="importTemplate" v-hasRole="['zjgly']">下载模板
@@ -402,6 +402,7 @@ import {
import {getToken} from "@/utils/auth";
import Treeselect from "@riophae/vue-treeselect";
import "@riophae/vue-treeselect/dist/vue-treeselect.css";
import {Loading} from 'element-ui';
export default {
name: "User",
@@ -676,7 +677,7 @@ export default {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.groupName == undefined || this.form.groupName == '') {
this.form.groupName = "未指定"
this.form.groupName = ""
}
if (this.form.nickName == undefined || this.form.nickName == '') {
this.form.nickName = this.form.userName;
@@ -733,6 +734,7 @@ export default {
},
// 文件上传成功处理
handleFileSuccess(response, file, fileList) {
Loading.service({fullscreen: true, text: "导入中..."}).close();
this.upload.open = false;
this.upload.isUploading = false;
this.$refs.upload.clearFiles();
@@ -742,6 +744,7 @@ export default {
// 提交上传文件
submitFileForm() {
this.$refs.upload.submit();
Loading.service({fullscreen: true, text: "导入中..."});
}
}
};