Commit 87300f81 authored by guoyou's avatar guoyou

员工录入

parent 85bfe6b2
module.exports = { module.exports = {
NODE_ENV: '"development"', NODE_ENV: '"development"',
BASE_API:'"https://xxtest.upyuns.com"',//'"https://dev.dfangche.com"',//'"https://xxfcmgmt.upyuns.com"(正)',//http://10.1.37.192:9527(何), //https://xxtest.upyuns.com(测),10.1.37.246:9527(韩), 10.1.37.244(李斌)10.1.37.248:8765(小威) BASE_API:'"http://10.1.37.192:9527"',//'"https://xxtest.upyuns.com"',//'"https://dev.dfangche.com"',//'"https://xxfcmgmt.upyuns.com"(正)',//http://10.1.37.192:9527(何), //https://xxtest.upyuns.com(测),10.1.37.246:9527(韩), 10.1.37.244(李斌)10.1.37.248:8765(小威)
APP_ORIGIN: '"https://wallstreetcn.com"' APP_ORIGIN: '"https://wallstreetcn.com"'
} }
...@@ -117,6 +117,14 @@ export function addEditor(obj) { ...@@ -117,6 +117,14 @@ export function addEditor(obj) {
}); });
} }
// 编辑员工
export function editorUpd(obj) {
return fetch({
url: '/api/admin/postion/admin/upd',
method: 'post',
data: obj
});
}
//删除员工 //删除员工
export function deleteStaffs(id) { export function deleteStaffs(id) {
return fetch({ return fetch({
......
<template> <template>
<div class="app-container calendar-list-container"> <div class="app-container calendar-list-container">
<div class="filter-container"> <div class="filter-container">
<el-form ref="queryForm" :model="listQuery" label-width="100px"> <el-form ref="queryForm" :model="listQuery" label-width="100px">
<el-row> <el-row>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="手机号"> <el-form-item label="手机号">
<el-input v-model.number="listQuery.phone" placeholder="请输入手机号"></el-input> <el-input v-model.number="listQuery.phone" placeholder="请输入手机号"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="姓名"> <el-form-item label="姓名">
<el-input v-model.number="listQuery.name" placeholder="请输入姓名"></el-input> <el-input v-model.number="listQuery.name" placeholder="请输入姓名"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="状态"> <el-form-item label="状态">
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选员工状态"> <el-select class="filter-item" v-model="listQuery.status" placeholder="请选员工状态">
<el-option :key="undefined" label="全部" :value="undefined"></el-option> <el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option <el-option
v-for="(item,index) in statusList " v-for="(item,index) in statusList "
:key="index" :key="index"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> ></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="4"> <el-col :span="4">
<el-form-item label="分公司"> <el-form-item label="分公司">
<el-select class="filter-item" v-model="listQuery.status" placeholder="请选分公司"> <el-autocomplete
class="inline-input"
v-model="listQuery.companyName"
:fetch-suggestions="querySearch"
placeholder="请选择分公司"
@select="handleSelectPark"
clearable
></el-autocomplete>
<!-- <el-select class="filter-item" v-model="listQuery.status" placeholder="请选分公司">
<el-option :key="undefined" label="全部" :value="undefined"></el-option> <el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option <el-option
v-for="(item,index) in statusList " v-for="(item,index) in companyList "
:key="index" :key="index"
:label="item.label" :label="item.label"
:value="item.value" :value="item.value"
></el-option> ></el-option>
</el-select> </el-select>-->
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
</el-form>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button class="filter-item" type="primary" v-waves icon="delete" @click="cleaningQuery">清除搜索条件</el-button>
</el-row> <el-button class="filter-item" type="primary" v-waves @click="addStaff">新增员工</el-button>
</el-form> <el-button class="filter-item" type="primary" v-waves @click="toLoad">批量导入员工</el-button>
<el-button class="filter-item" type="primary" v-waves icon="search" @click="handleFilter">搜索</el-button>
<el-button
class="filter-item"
type="primary"
v-waves
icon="delete"
@click="cleaningQuery"
>清除搜索条件</el-button>
<el-button class="filter-item" type="primary" v-waves @click="addStaff">新增员工</el-button> <el-table
<el-button class="filter-item" type="primary" v-waves @click="toLoad">批量导入员工</el-button> :key="tableKey"
:data="list"
v-loading="listLoading"
border
fit
highlight-current-row
style="width: 100%"
>
<el-table-column prop="name" label="姓名" width="180" align="center"></el-table-column>
<el-table-column prop="phone" label="手机号" align="center"></el-table-column>
<el-table-column prop="jobName" label="职位" align="center"></el-table-column>
<el-table-column prop="companyName" label="所属公司" align="center"></el-table-column>
<el-table-column prop="positionName" label="身份" align="center"></el-table-column>
<el-table-column label="状态" align="center">
<template scope="scope">
<span v-if="scope.row.status == 1">已核销</span>
<span v-else>未核销</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="400" fixed="right">
<template scope="scope">
<el-button
size="small"
class="el-button el-button--text el-button--small"
@click="editorStaff(scope.row)"
v-if="scope.row.status != 1"
>编辑</el-button>
<el-button
size="small"
class="el-button el-button--text el-button--small"
@click="deleteStaff(scope.row)"
v-if="scope.row.status != 1"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<el-table <el-pagination
:key="tableKey" @size-change="handleSizeChange"
:data="list" @current-change="handleCurrentChange"
v-loading="listLoading" :current-page.sync="listQuery.page"
border :page-sizes="[10,20,30, 50]"
fit :page-size="listQuery.limit"
highlight-current-row layout="total, sizes, prev, pager, next, jumper"
style="width: 100%" :total="total"
> style="margin-top:20px"
<el-table-column prop="name" label="姓名" width="180" align="center"></el-table-column> ></el-pagination>
<el-table-column prop="phone" label="手机号" align="center"></el-table-column>
<el-table-column prop="jobName" label="职位" align="center"></el-table-column>
<el-table-column prop="companyName" label="所属公司" align="center"></el-table-column>
<el-table-column prop="positionName" label="身份" align="center"></el-table-column>
<el-table-column label="状态" align="center">
<template scope="scope">
<span v-if="scope.row.status == 1">已核销</span>
<span v-else>未核销</span>
</template>
</el-table-column>
<el-table-column align="center" label="操作" width="400" fixed="right">
<template scope="scope">
<el-button
size="small"
class="el-button el-button--text el-button--small"
@click="editorStaff(scope.row)"
v-if="scope.row.status != 1"
>编辑</el-button>
<el-button
size="small"
class="el-button el-button--text el-button--small"
@click="deleteStaff(scope.row)"
v-if="scope.row.status != 1"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination <!-- 新增编辑员工 -->
@size-change="handleSizeChange" <el-dialog :title="staffTitle" :visible.sync="bulkUploadMember" class="member" @close="closeAdd">
@current-change="handleCurrentChange" <el-form :model="staffTitleFrom" ref="userMembership" :rules="rules" label-width="100px">
:current-page.sync="listQuery.page" <el-form-item label="员工姓名">
:page-sizes="[10,20,30, 50]" <el-input v-model.number="staffTitleFrom.name" placeholder="请输入姓名"></el-input>
:page-size="listQuery.limit" </el-form-item>
layout="total, sizes, prev, pager, next, jumper" <el-form-item label="手机号">
:total="total" <el-input v-model.number="staffTitleFrom.phone" placeholder="请输入手机号"></el-input>
style="margin-top:20px" </el-form-item>
></el-pagination> <el-form-item label="员工身份">
<el-select
class="filter-item"
v-model="staffTitleFrom.positionId"
placeholder="请选择员工身份"
style="width:100%"
>
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option
v-for="(item,index) in postionsList "
:key="index"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<!-- 新增编辑员工 --> <el-form-item label="员工职位">
<el-dialog <el-select
:title="staffTitle" class="filter-item"
:visible.sync="bulkUploadMember" v-model="staffTitleFrom.jobId"
class="member" placeholder="请选择员工身份"
@close="closeAdd" style="width:100%"
> >
<el-form :model="staffTitleFrom" ref="userMembership" :rules="rules" label-width="100px"> <el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-form-item label="员工姓名"> <el-option
<el-input v-model.number="staffTitleFrom.name" placeholder="请输入姓名"></el-input> v-for="(item,index) in jobsList "
</el-form-item> :key="index"
<el-form-item label="手机号"> :label="item.name"
<el-input v-model.number="staffTitleFrom.phone" placeholder="请输入手机号"></el-input> :value="item.id"
</el-form-item> ></el-option>
<el-form-item label="员工身份"> </el-select>
<el-select </el-form-item>
class="filter-item"
v-model="staffTitleFrom.positionId"
placeholder="请选择员工身份"
style="width:100%"
>
<el-option :key="undefined" label="全部" :value="undefined"></el-option>
<el-option
v-for="(item,index) in postionsList "
:key="index"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
<div style="text-align:center">
<el-button type="primary" @click="confirm">确 定</el-button>
<el-button type="primary" @click="bulkUploadMember = false">取消</el-button>
</div>
</el-form>
</el-dialog>
<!--批量导入会员窗口--> <el-form-item label="分公司">
<el-dialog title="导入会员" :visible.sync="tolead"> <el-autocomplete
<el-form :model="fileForm"> class="inline-input"
<el-form-item label="上传文件" label-width="80px"> v-model="staffTitleFrom.companyName"
<el-button type="primary" icon="el-icon-download"> :fetch-suggestions="querySearch"
<a placeholder="请选择分公司"
class="el-icon-download" style="width:100%"
href="https://mgmt.dfangche.com/axshare/userposition.xlsx" @select="handleSelectParks"
>下载模板</a> ></el-autocomplete>
</el-button> </el-form-item>
<div style="text-align:center">
<el-button type="primary" @click="confirm">确 定</el-button>
<el-button type="primary" @click="bulkUploadMember = false">取消</el-button>
</div>
</el-form>
</el-dialog>
<el-upload <!--批量导入会员窗口-->
ref="uploadExcel" <el-dialog title="导入会员" :visible.sync="tolead">
:limit="limitNum" <el-form :model="fileForm">
action="1111" <el-form-item label="上传文件" label-width="80px">
:headers="getHeaderWithToken" <el-button type="primary" icon="el-icon-download">
accept=".xlsx" <a class="el-icon-download" href="https://mgmt.dfangche.com/axshare/userposition.xlsx">下载模板</a>
:http-request="upLoad" </el-button>
:on-remove="handleRemove"
:before-remove="beforeRemove"
:before-upload="beforeUploadFile"
:on-change="fileChange"
:on-exceed="exceedFile"
:file-list="fileList"
>
<el-button size="small" type="primary" icon="el-icon-edit">
上传文件
<i class="el-icon-upload el-icon--right"></i>
</el-button>
<div slot="tip" class="el-upload__tip">只能上传xlsx(Excel2007以上版本)文件,且不超过10M</div>
</el-upload>
<el-button
size="small"
class="filter-item"
type="primary"
@click="cancelNotDeleteForm"
>取消</el-button>
</el-form-item>
</el-form>
</el-dialog>
<!-- 提示 --> <el-upload
<el-dialog title="上传提示" :visible.sync="uploadHiut"> ref="uploadExcel"
<p> :limit="limitNum"
上传成功: action="1111"
<b>{{uploadListHiut.success}}</b>条,上传失败: :headers="getHeaderWithToken"
<b>{{uploadListHiut.error}}</b> accept=".xlsx"
</p> :http-request="upLoad"
<ul class="defeated"> :on-remove="handleRemove"
<li v-for="(item,index) in uploadListHiut.uploadList" :key="index"> :before-remove="beforeRemove"
<p> :before-upload="beforeUploadFile"
失败行数: :on-change="fileChange"
<span>{{item.num}}</span>,失败原因: :on-exceed="exceedFile"
<span>{{item.msg}}</span> :file-list="fileList"
</p> >
</li> <el-button size="small" type="primary" icon="el-icon-edit">
</ul> 上传文件
</el-dialog> <i class="el-icon-upload el-icon--right"></i>
</div> </el-button>
</div> <div slot="tip" class="el-upload__tip">只能上传xlsx(Excel2007以上版本)文件,且不超过10M</div>
</el-upload>
<el-button size="small" class="filter-item" type="primary" @click="cancelNotDeleteForm">取消</el-button>
</el-form-item>
</el-form>
</el-dialog>
<!-- 提示 -->
<el-dialog title="上传提示" :visible.sync="uploadHiut">
<p>
上传成功:
<b>{{uploadListHiut.success}}</b>条,上传失败:
<b>{{uploadListHiut.error}}</b>
</p>
<ul class="defeated">
<li v-for="(item,index) in uploadListHiut.uploadList" :key="index">
<p>
失败行数:
<span>{{item.num}}</span>,失败原因:
<span>{{item.msg}}</span>
</p>
</li>
</ul>
</el-dialog>
</div>
</div>
</template> </template>
<script> <script>
import { import {
staffList, staffList,
postions, postions,
addEditor, addEditor,
deleteStaffs deleteStaffs,
} from "src/api/admin/userManagement/index"; jobs,editorUpd
import { getToken } from "src/utils/auth"; } from 'src/api/admin/userManagement/index'
import { mapGetters } from "vuex"; import { getToken } from 'src/utils/auth'
import { staffImport } from "src/api/admin/UserMember/index"; import { mapGetters } from 'vuex'
import { staffImport } from 'src/api/admin/UserMember/index'
import { getAll } from 'api/base_info/branch_company'
export default { export default {
created() { created() {
this.getList(); this.getList()
this.postionsFn(); this.postionsFn()
}, this.getAllFn()
computed: { this.jobsFn()
...mapGetters(["elements"]), },
/** computed: {
* 获取token ...mapGetters(['elements']),
*/ /**
* 获取token
*/
getHeaderWithToken() { getHeaderWithToken() {
return { Authorization: getToken() }; return { Authorization: getToken() }
} }
}, },
data() { data() {
return { return {
activeId: "", jobsList: [],
uploadListHiut: { activeId: '',
uploadList: [], uploadListHiut: {
success: "", uploadList: [],
error: "" success: '',
}, error: ''
uploadHiut: false, },
fileList: [], companyList: [],
BASE_API: process.env.BASE_API, uploadHiut: false,
limitNum: 1, fileList: [],
fileForm: { BASE_API: process.env.BASE_API,
file: "" limitNum: 1,
}, fileForm: {
tolead: false, file: ''
listQuery: { },
name: "", tolead: false,
phone: "", listQuery: {
status: null, name: '',
page: 1, phone: '',
limit: 10 status: null,
}, page: 1,
total: null, limit: 10,
tableKey: 0, companyId: '',
list: [], companyName: ''
listLoading: true, },
statusList: [ total: null,
{ tableKey: 0,
label: "未核销", list: [],
value: "0" listLoading: true,
}, statusList: [
{ {
label: "已核销", label: '未核销',
value: "1" value: '0'
} },
], {
postionsList: [], label: '已核销',
staffTitle: "新增员工", value: '1'
bulkUploadMember: false, }
staffTitleFrom: { ],
phone: "", postionsList: [],
name: "", staffTitle: '新增员工',
positionId: "" bulkUploadMember: false,
}, staffTitleFrom: {
rules: {} phone: '',
}; name: '',
}, positionId: '',
methods: { jobId: '',
//新增,编辑员工弹窗关闭 companyId: '',
closeAdd() { companyName: ''
this.staffTitleFrom = { },
phone: "", rules: {}
name: "", }
positionId: "" },
}; methods: {
}, handleSelectPark(item) {
upLoad(file) { this.listQuery.companyId = item.id
var form = new FormData(); },
// 文件对象 handleSelectParks(item) {
form.append("file", file.file); this.staffTitleFrom.companyId = item.id
staffImport(form).then(res => { this.staffTitleFrom.companyName = item.name
console.log(res); },
this.uploadHiut = true; createFilter(queryString) {
(this.uploadListHiut = { return restaurant => {
uploadList: res.data.data, return restaurant.name.indexOf(queryString.toLowerCase()) != -1
success: res.data.success, }
error: res.data.error },
}), querySearch(queryString, cb) {
this.getList(); let selectArry = []
}); this.companyList.map(function(item) {
}, item.value = item.name
//excel上传 selectArry.push(item)
handleRemove(file, fileList) { })
//console.log(file, fileList); this.selectArry = selectArry
}, var results = queryString
handlePreview(file) { ? selectArry.filter(this.createFilter(queryString))
//console.log(file); : selectArry
}, // 调用 callback 返回建议列表的数据
beforeRemove(file, fileList) { cb(results)
return this.$confirm(`确定移除 ${file.name}?`); },
}, //分公司
// 文件超出个数限制时的钩子 getAllFn() {
exceedFile(files, fileList) { getAll().then(data => {
this.$notify.warning({ if (data.status == 200) {
title: "警告", this.companyList = data.data
message: `只能选择 ${ }
this.limitNum })
} 个文件,当前共选择了 ${files.length + fileList.length} 个` },
}); //新增,编辑员工弹窗关闭
}, closeAdd() {
// 文件状态改变时的钩子 this.staffTitleFrom = {
fileChange(file, fileList) { phone: '',
//console.log("change"); name: '',
//console.log(file); positionId: '',
this.fileForm.file = file.raw; jobId: '',
//console.log(this.fileForm.file); companyId: '',
// console.log(fileList); companyName: ''
}, }
// 上传文件之前的钩子, 参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传 },
beforeUploadFile(file) { upLoad(file) {
//console.log("before upload"); var form = new FormData()
//console.log(file); // 文件对象
let extension = file.name.substring(file.name.lastIndexOf(".") + 1); form.append('file', file.file)
let size = file.size / 1024 / 1024; staffImport(form).then(res => {
if (extension !== "xlsx") { console.log(res)
this.$notify.warning({ this.uploadHiut = true
title: "警告", ;(this.uploadListHiut = {
message: `只能上传Excel 2007以上版本(即后缀是.xlsx)的文件` uploadList: res.data.data,
}); success: res.data.success,
} error: res.data.error
if (size > 10) { }),
this.$notify.warning({ this.getList()
title: "警告", })
message: `文件大小不得超过10M` },
}); //excel上传
} handleRemove(file, fileList) {
}, //console.log(file, fileList);
cancelNotDeleteForm() { },
this.tolead = false; handlePreview(file) {
this.$refs.uploadExcel.clearFiles(); //console.log(file);
}, },
//员工列表 beforeRemove(file, fileList) {
getList() { return this.$confirm(`确定移除 ${file.name}?`)
staffList(this.listQuery).then(data => { },
this.listLoading = true; // 文件超出个数限制时的钩子
if (data.status == 200) { exceedFile(files, fileList) {
console.log(data); this.$notify.warning({
this.list = data.data.data; title: '警告',
this.total = data.data.totalCount; message: `只能选择 ${
this.listLoading = false; this.limitNum
} } 个文件,当前共选择了 ${files.length + fileList.length} 个`
}); })
}, },
handleSizeChange(val) { // 文件状态改变时的钩子
this.listQuery.limit = val; fileChange(file, fileList) {
this.getList(); //console.log("change");
}, //console.log(file);
handleCurrentChange(val) { this.fileForm.file = file.raw
this.listQuery.page = val; //console.log(this.fileForm.file);
this.getList(); // console.log(fileList);
}, },
//搜索 // 上传文件之前的钩子, 参数为上传的文件,若返回 false 或者返回 Promise 且被 reject,则停止上传
handleFilter() { beforeUploadFile(file) {
this.getList(); //console.log("before upload");
}, //console.log(file);
//清空搜索条件 let extension = file.name.substring(file.name.lastIndexOf('.') + 1)
cleaningQuery() { let size = file.size / 1024 / 1024
this.listQuery.page = 1; if (extension !== 'xlsx') {
this.listQuery.limit = 10; this.$notify.warning({
this.listQuery.name = ""; title: '警告',
this.listQuery.phone = ""; message: `只能上传Excel 2007以上版本(即后缀是.xlsx)的文件`
this.listQuery.status = ""; })
this.getList(); }
}, if (size > 10) {
//新增员工 this.$notify.warning({
addStaff() { title: '警告',
this.staffTitle == "新增员工" message: `文件大小不得超过10M`
this.bulkUploadMember = true; })
}, }
//批量导入员工 },
toLoad() { cancelNotDeleteForm() {
this.tolead = true; this.tolead = false
}, this.$refs.uploadExcel.clearFiles()
//编辑员工 },
editorStaff(row) { //员工列表
this.activeId = row.id; getList() {
this.staffTitle = "编辑员工"; staffList(this.listQuery).then(data => {
this.bulkUploadMember = true; this.listLoading = true
this.staffTitleFrom = { if (data.status == 200) {
phone: row.phone, console.log(data)
name: row.name, this.list = data.data.data
positionId: row.positionId this.total = data.data.totalCount
}; this.listLoading = false
}, }
//删除员工 })
deleteStaff(row) { },
this.$confirm("确定删除吗?", "提示", { handleSizeChange(val) {
confirmButtonText: "确定", this.listQuery.limit = val
cancelButtonText: "取消", this.getList()
type: "warning" },
}).then(() => { handleCurrentChange(val) {
deleteStaffs(row.id).then(data => { this.listQuery.page = val
if (data.status == 200) { this.getList()
this.$notify({ },
title: "成功", //搜索
message: "删除成功", handleFilter() {
type: "success", this.getList()
duration: 2000 },
}); //清空搜索条件
this.getList(); cleaningQuery() {
} else { this.listQuery.page = 1
this.$notify({ this.listQuery.limit = 10
title: "失败", this.listQuery.name = ''
message: "删除失败", this.listQuery.phone = ''
type: "failed", this.listQuery.status = ''
duration: 2000 this.listQuery.companyId = ''
}); this.listQuery.companyName = ''
} this.getList()
}); },
}); //新增员工
}, addStaff() {
//确定 this.staffTitle = '新增员工'
confirm(formName) { this.bulkUploadMember = true
if (this.staffTitle == "新增员工") { },
addEditor(this.staffTitleFrom).then(data => { //批量导入员工
if (data.status == 200) { toLoad() {
this.$notify({ this.tolead = true
title: "成功", },
message: "新增成功", //编辑员工
type: "success", editorStaff(row) {
duration: 2000 this.activeId = row.id
}); this.staffTitle = '编辑员工'
this.bulkUploadMember = false; this.bulkUploadMember = true
this.getList(); this.staffTitleFrom = {
} phone: row.phone,
}); name: row.name,
} else { positionId: row.positionId,
this.staffTitleFrom.id = this.activeId; companyId:row.companyId,
addEditor(this.staffTitleFrom).then(data => { companyName:row.companyName,
if (data.status == 200) { }
this.$notify({ },
title: "成功", //删除员工
message: "编辑成功", deleteStaff(row) {
type: "success", this.$confirm('确定删除吗?', '提示', {
duration: 2000 confirmButtonText: '确定',
}); cancelButtonText: '取消',
this.bulkUploadMember = false; type: 'warning'
this.getList(); }).then(() => {
} deleteStaffs(row.id).then(data => {
}); if (data.status == 200) {
} this.$notify({
}, title: '成功',
//身份列表 message: '删除成功',
postionsFn() { type: 'success',
postions().then(data => { duration: 2000
//console.log(data); })
if (data.status == 200) { this.getList()
this.postionsList = data.data; } else {
} this.$notify({
}); title: '失败',
}, message: '删除失败',
jobsFn() { type: 'failed',
jobs().then(data => { duration: 2000
//console.log(data); })
if (data.status == 200) { }
this.jobsList = data.data; })
} })
}); },
}, //确定
resetForm(formName) { confirm(formName) {
this.$refs[formName].resetFields(); if (this.staffTitle == '新增员工') {
} addEditor(this.staffTitleFrom).then(data => {
} if (data.status == 200) {
}; this.$notify({
title: '成功',
message: '新增成功',
type: 'success',
duration: 2000
})
this.bulkUploadMember = false
this.getList()
}
})
} else {
this.staffTitleFrom.id = this.activeId
editorUpd(this.staffTitleFrom).then(data => {
if (data.status == 200) {
this.$notify({
title: '成功',
message: '编辑成功',
type: 'success',
duration: 2000
})
this.bulkUploadMember = false
this.getList()
}
})
}
},
//身份列表
postionsFn() {
postions().then(data => {
//console.log(data);
if (data.status == 200) {
this.postionsList = data.data
}
})
},
jobsFn() {
jobs().then(data => {
//console.log(data);
if (data.status == 200) {
this.jobsList = data.data
}
})
},
resetForm(formName) {
this.$refs[formName].resetFields()
}
}
}
</script> </script>
<style> <style>
.member .el-dialog--small { .member .el-dialog--small {
width: 500px; width: 500px;
} }
.defeated { .defeated {
padding: 0; padding: 0;
} }
.defeated li { .defeated li {
list-style: none; list-style: none;
} }
</style> </style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment