|
@@ -51,27 +51,23 @@
|
|
<el-form-item>
|
|
<el-form-item>
|
|
<div style="color:#999;font-size:13px;">共{{total}}人</div>
|
|
<div style="color:#999;font-size:13px;">共{{total}}人</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item style="float:right;" v-if="permissions.structureExport">
|
|
|
|
+ <el-link type="primary" :underline="false" @click="customConfigShow">自定义配置</el-link>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item style="float:right;" v-if="permissions.structureExport">
|
|
<el-form-item style="float:right;" v-if="permissions.structureExport">
|
|
<el-link type="primary" :underline="false" @click="showExportDialog">导出人员</el-link>
|
|
<el-link type="primary" :underline="false" @click="showExportDialog">导出人员</el-link>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureAdd">
|
|
<el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureAdd">
|
|
<el-link type="primary" :underline="false" @click="openInsertDialog(null)">添加人员</el-link>
|
|
<el-link type="primary" :underline="false" @click="openInsertDialog(null)">添加人员</el-link>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <!-- 原来的 -->
|
|
|
|
- <!-- <el-form-item style="float:right;" v-if="depData != null && depData.id != -1 && depData.id != 0">
|
|
|
|
- <el-upload ref="upload" action="#" :limit="1" :http-request="importUser" :show-file-list="false">
|
|
|
|
- <el-link type="primary" :underline="false">批量导入</el-link>
|
|
|
|
- </el-upload>
|
|
|
|
- </el-form-item> -->
|
|
|
|
|
|
+
|
|
<el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureImport">
|
|
<el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureImport">
|
|
- <el-upload ref="upload" action="#" :limit="1" :http-request="importUser" :show-file-list="false">
|
|
|
|
- <el-link type="primary" :underline="false">批量导入</el-link>
|
|
|
|
- </el-upload>
|
|
|
|
|
|
+ <el-link type="primary" :underline="false" @click="importUserC">批量导入</el-link>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
- <el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureImport">
|
|
|
|
|
|
+ <!-- <el-form-item style="float:right;" v-if="user.dingdingUserid == null && permissions.structureImport">
|
|
<el-link type="primary" :underline="false" href="./upload/人员导入模板.xlsx" download="人员导入模板.xlsx">模板下载</el-link>
|
|
<el-link type="primary" :underline="false" href="./upload/人员导入模板.xlsx" download="人员导入模板.xlsx">模板下载</el-link>
|
|
- </el-form-item>
|
|
|
|
|
|
+ </el-form-item> -->
|
|
<!-- <el-form-item v-if="depData != null && depData.id != -1 && depData.id != 0" style="float:right;border: 0.5px solid #20a0ff;height: 27px;margin-top: 6px;">
|
|
<!-- <el-form-item v-if="depData != null && depData.id != -1 && depData.id != 0" style="float:right;border: 0.5px solid #20a0ff;height: 27px;margin-top: 6px;">
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
<!-- <el-form-item style="float:right;">
|
|
<!-- <el-form-item style="float:right;">
|
|
@@ -261,6 +257,14 @@
|
|
<el-cascader v-model="insertForm.departmentId" placeholder="请选择部门" style="width: 100%"
|
|
<el-cascader v-model="insertForm.departmentId" placeholder="请选择部门" style="width: 100%"
|
|
:options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader>
|
|
:options="option" :props="{ checkStrictly: true,expandTrigger: 'hover' }" :show-all-levels="false" clearable></el-cascader>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item label="直属上司">
|
|
|
|
+ <el-select v-model="insertForm.superiorId" placeholder="请选择角色" style="width: 100%">
|
|
|
|
+ <el-option v-for="item in users" :label="item.name" :value="item.id" :key="item.id">
|
|
|
|
+ <span style="float: left">{{item.name}}</span>
|
|
|
|
+ <span style="float: right; color: #8492a6; font-size: 13px">{{item.departmentName}}</span>
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="角色" prop="roleId">
|
|
<el-form-item label="角色" prop="roleId">
|
|
<el-select v-model="insertForm.roleId" placeholder="请选择角色" style="width: 100%">
|
|
<el-select v-model="insertForm.roleId" placeholder="请选择角色" style="width: 100%">
|
|
<el-option v-for="item in acquireRoleList" :label="item.rolename" :value="item.id" :key="item.name">
|
|
<el-option v-for="item in acquireRoleList" :label="item.rolename" :value="item.id" :key="item.name">
|
|
@@ -269,6 +273,13 @@
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+ <el-form-item :label="item.name" v-for="item,index in userCustomConfig" :key="item.id">
|
|
|
|
+ <el-select v-if="item.type == 0" v-model="insertForm[suoying[index]]" placeholder="请选择" clearable style="width: 100%">
|
|
|
|
+ <el-option v-for="option in item.itemList" :label="option.name" :value="option.id" :key="option.id">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ <el-input v-else v-model="insertForm[suoying[index]]" placeholder="请输入" clearable></el-input>
|
|
|
|
+ </el-form-item>
|
|
<el-form-item label="入职时间" prop="phone">
|
|
<el-form-item label="入职时间" prop="phone">
|
|
<el-date-picker v-model="insertForm.inductionDate" value-format="yyyy-MM-dd"></el-date-picker>
|
|
<el-date-picker v-model="insertForm.inductionDate" value-format="yyyy-MM-dd"></el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
@@ -443,6 +454,72 @@
|
|
<el-button type="primary" @click="addManagementForm('managementForm')">提 交</el-button>
|
|
<el-button type="primary" @click="addManagementForm('managementForm')">提 交</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+ <!-- 自定义配置项 -->
|
|
|
|
+ <el-dialog title="自定义配置项管理" show-header="false" v-if="customConfigDialog" :visible.sync="customConfigDialog" :close-on-click-modal="false" customClass="customWidth" width="650px" top="20px">
|
|
|
|
+ <div style="margin-left:30px;">
|
|
|
|
+ <p v-for="item,index in customConfigList" :key="index">
|
|
|
|
+ <el-input size="medium" v-model="item.name" placeholder="请输入自定义配置项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+ <el-radio size="medium" :disabled="!item.name" v-model="item.type" :label="0" style="margin-right:10px;margin-left:10px">下拉</el-radio>
|
|
|
|
+ <el-radio size="medium" :disabled="!item.name" v-model="item.type" :label="1">输入</el-radio>
|
|
|
|
+ <span style="display:inline-block;width:100px"><el-button v-if="cusItemTypes[index] == 0" type="primary" size="small" @click="getConfigItemBtn(item)">配置选项</el-button></span>
|
|
|
|
+ <el-button type="danger" size="small" @click="customConfigDelete(item,index)" style="">删除</el-button>
|
|
|
|
+ </p>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="customConfigDialog = false" >关闭</el-button>
|
|
|
|
+ <el-button type="primary" @click="customConfigListAdd" :disabled="customConfigList.length >= 5">新增</el-button>
|
|
|
|
+ <el-button type="primary" @click="customConfigListSave" >保存</el-button>
|
|
|
|
+
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <!-- 为下拉时的选项配置 -->
|
|
|
|
+ <el-dialog title="配置选项" v-if="configItemDialog" :visible.sync="configItemDialog" :close-on-click-modal="false" customClass="customWidth" width="500px" append-to-body>
|
|
|
|
+ <el-table :data="configItemList" height="400px" style="width:100%" key="configItemTable">
|
|
|
|
+ <el-table-column prop="id" width="60" label="序号">
|
|
|
|
+ <template slot-scope="scope" >
|
|
|
|
+ {{scope.$index + 1}}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="name" label="名称" ></el-table-column>
|
|
|
|
+ <el-table-column label="操作" width="150">
|
|
|
|
+ <template slot-scope="scope" >
|
|
|
|
+ <el-button size="small" type="primary" @click="configItemAorM(scope.row)">编辑</el-button>
|
|
|
|
+ <el-button size="small" type="danger" @click="configItemDelete(scope.row)">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="configItemDialog = false" >关闭</el-button>
|
|
|
|
+ <el-button type="primary" @click="configItemAorM" >新增配置选项</el-button>
|
|
|
|
+ </div>
|
|
|
|
+
|
|
|
|
+ <el-dialog title="新增/编辑配置选项" v-if="configItemAorMDialog" :visible.sync="configItemAorMDialog" :close-on-click-modal="false" customClass="customWidth" width="500px" append-to-body>
|
|
|
|
+ <span>名称</span>
|
|
|
|
+ <el-input size="medium" v-model="AorMitem.name" placeholder="请输入自定义配置项名称" style="width:200px;margin-right:20px" maxlength="8"></el-input>
|
|
|
|
+
|
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button type="primary" @click="configItemAorMDialog = false" >取消</el-button>
|
|
|
|
+ <el-button type="primary" @click="configItemAorMSure" >提交</el-button>
|
|
|
|
+ </div>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <!-- 批量导入 -->
|
|
|
|
+ <el-dialog title="人员批量导入" v-if="importDialog" :visible.sync="importDialog" customClass="customWidth" width="500px">
|
|
|
|
+ <p>1. 下载
|
|
|
|
+ <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/人员导入模板.xlsx" download="人员导入模板.xlsx">人员导入模板.xlsx</el-link>
|
|
|
|
+ </p>
|
|
|
|
+ <p>2. 填写excel模板,并上传。</p>
|
|
|
|
+ <p style="display: flex;justify-content: center;padding-bottom:1em;">
|
|
|
|
+ <el-upload ref="upload" action="#" :limit="1" :http-request="importUser" :show-file-list="false">
|
|
|
|
+ <el-button type="primary" :underline="false" :loading="importingData">开始导入</el-button>
|
|
|
|
+ </el-upload>
|
|
|
|
+ </p>
|
|
|
|
+ </el-dialog>
|
|
</section>
|
|
</section>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -519,7 +596,8 @@
|
|
costApplyDate: '2021-04-09',
|
|
costApplyDate: '2021-04-09',
|
|
inductionDate: '2021-04-09',
|
|
inductionDate: '2021-04-09',
|
|
position: '',
|
|
position: '',
|
|
- certJson: []
|
|
|
|
|
|
+ certJson: [],
|
|
|
|
+ plateMap:{}
|
|
},
|
|
},
|
|
rules: {
|
|
rules: {
|
|
name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
|
name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
|
|
@@ -592,7 +670,28 @@
|
|
},
|
|
},
|
|
managementTableData: [],
|
|
managementTableData: [],
|
|
certificate: '',
|
|
certificate: '',
|
|
- addUserId: ''
|
|
|
|
|
|
+ addUserId: '',
|
|
|
|
+ userCustomConfig: [],
|
|
|
|
+
|
|
|
|
+ customConfigDialog: false,
|
|
|
|
+ importDialog: false,
|
|
|
|
+ importingData: false,
|
|
|
|
+ customConfigList: [],
|
|
|
|
+ cusItemTypes: [],
|
|
|
|
+ configItemList: [],
|
|
|
|
+ configItemId: null,
|
|
|
|
+ configItemDialog: false,
|
|
|
|
+
|
|
|
|
+ configItemAorMDialog: false,
|
|
|
|
+ AorMitem: {
|
|
|
|
+ name: null,
|
|
|
|
+ userCustomId: null,
|
|
|
|
+ id: null
|
|
|
|
+ },
|
|
|
|
+ tableLoading: false,
|
|
|
|
+
|
|
|
|
+ suoying: ['plate1','plate2','plate3','plate4','plate5'],
|
|
|
|
+ insertFormPlates: []
|
|
};
|
|
};
|
|
},
|
|
},
|
|
filters: {
|
|
filters: {
|
|
@@ -608,6 +707,266 @@
|
|
that = this;
|
|
that = this;
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ test(){
|
|
|
|
+ this.getCustomConfigList()
|
|
|
|
+ },
|
|
|
|
+ // 自定义配置项
|
|
|
|
+ customConfigShow(){
|
|
|
|
+ this.getCustomConfigList()
|
|
|
|
+ this.customConfigDialog = true
|
|
|
|
+ },
|
|
|
|
+ getConfigItemBtn(item){
|
|
|
|
+ this.configItemDialog = true
|
|
|
|
+ this.AorMitem.userCustomId = item.id
|
|
|
|
+ this.getConfigItem()
|
|
|
|
+ },
|
|
|
|
+ getConfigItem(){ // 获取配置下拉数据
|
|
|
|
+ this.http.post('/sub-user-custom/list',{
|
|
|
|
+ userCustomId: this.AorMitem.userCustomId
|
|
|
|
+ },res => {
|
|
|
|
+ if(res.code == 'ok'){
|
|
|
|
+ this.configItemList = res.data
|
|
|
|
+ }else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },err => {
|
|
|
|
+ this.tableLoading = false
|
|
|
|
+ this.$message({
|
|
|
|
+ message: err,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getCustomConfigList(){ // 获取自定义配置
|
|
|
|
+ this.http.post('/user-custom/list',{},
|
|
|
|
+ res => {
|
|
|
|
+ if(res.code == 'ok'){
|
|
|
|
+ let lists = JSON.parse(JSON.stringify(res.data))
|
|
|
|
+ this.userCustomConfig = JSON.parse(JSON.stringify(res.data))
|
|
|
|
+ // let lists = res.data
|
|
|
|
+ this.customConfigList = res.data
|
|
|
|
+ // this.customConfigList = [
|
|
|
|
+ // { name: '', id: null, type: 1, companyId: null },
|
|
|
|
+ // { name: '', id: null, type: 1, companyId: null },
|
|
|
|
+ // { name: '', id: null, type: 1, companyId: null },
|
|
|
|
+ // { name: '', id: null, type: 1, companyId: null },
|
|
|
|
+ // { name: '', id: null, type: 1, companyId: null },
|
|
|
|
+ // ]
|
|
|
|
+ // for(let i in lists){
|
|
|
|
+ // this.$set(this.customConfigList[i],'name',lists[i].name)
|
|
|
|
+ // this.$set(this.customConfigList[i],'id',lists[i].id)
|
|
|
|
+ // this.$set(this.customConfigList[i],'type',lists[i].type)
|
|
|
|
+ // this.$set(this.customConfigList[i],'companyId',lists[i].companyId)
|
|
|
|
+ // }
|
|
|
|
+ console.log('customConfigList',this.customConfigList);
|
|
|
|
+ this.cusItemTypes = []
|
|
|
|
+ for(let j in this.customConfigList){
|
|
|
|
+ if(this.customConfigList[j].type == null || this.customConfigList[j].type == 0){
|
|
|
|
+ this.customConfigList[j].type = 0
|
|
|
|
+ this.cusItemTypes[j] = 0
|
|
|
|
+ }else{
|
|
|
|
+ this.cusItemTypes[j] = 1
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },err => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: err,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ customConfigListSave(){ // 保存/修改自定义配置
|
|
|
|
+ // let jsonStr = ''
|
|
|
|
+ // for(let i in this.customConfigList){
|
|
|
|
+ // if(this.customConfigList[i].name){
|
|
|
|
+ // jsonStr += JSON.stringify(this.customConfigList[i]) + ','
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+ // jsonStr = jsonStr.substring(0,jsonStr.length - 1)
|
|
|
|
+ // let jsonStr = []
|
|
|
|
+ for(let i in this.customConfigList){
|
|
|
|
+ if(!this.customConfigList[i].name){
|
|
|
|
+ this.customConfigList.splice(i,1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.http.post('/user-custom/addOrMod',{
|
|
|
|
+ json: JSON.stringify(this.customConfigList)
|
|
|
|
+ },res => {
|
|
|
|
+ if(res.code == 'ok'){
|
|
|
|
+ this.getCustomConfigList()
|
|
|
|
+ this.customConfigDialog = false
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '保存成功',
|
|
|
|
+ type: 'success'
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },err => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: err,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ customConfigDelete(item,index){
|
|
|
|
+ if(item.id){
|
|
|
|
+ this.http.post('/user-custom/delete',{
|
|
|
|
+ id: item.id
|
|
|
|
+ },res => {
|
|
|
|
+ if(res.code == 'ok'){
|
|
|
|
+ this.getCustomConfigList()
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '删除成功',
|
|
|
|
+ type: 'success'
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },err => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: err,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }else{
|
|
|
|
+ this.customConfigList.splice(index,1)
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ configItemAorM(item){
|
|
|
|
+ this.configItemAorMDialog = true
|
|
|
|
+ if(item){
|
|
|
|
+ this.AorMitem.name = item.name
|
|
|
|
+ this.AorMitem.id = item.id
|
|
|
|
+ }else{
|
|
|
|
+ this.AorMitem.name = null
|
|
|
|
+ this.AorMitem.id = null
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ configItemAorMSure(){ // 新增/修改配置下拉选项
|
|
|
|
+ if(!this.AorMitem.name){
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '名称不能为空',
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.http.post('/sub-user-custom/addOrMod',this.AorMitem,res => {
|
|
|
|
+ if(res.code == 'ok'){
|
|
|
|
+ this.configItemAorMDialog = false
|
|
|
|
+ this.getConfigItem()
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '提交成功',
|
|
|
|
+ type: 'success'
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },err => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: err,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ configItemDelete(item){ // 删除配置下拉选项
|
|
|
|
+ this.http.post('/sub-user-custom/delete',{
|
|
|
|
+ id: item.id
|
|
|
|
+ },res => {
|
|
|
|
+ if(res.code == 'ok'){
|
|
|
|
+ this.getConfigItem()
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '删除成功',
|
|
|
|
+ type: 'success'
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },err => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: err,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // 获取添加人员时的自定义配置信息
|
|
|
|
+ getUserCustomConfig(e){
|
|
|
|
+ this.http.post('/user-custom/list',{},
|
|
|
|
+ res => {
|
|
|
|
+ if(res.code == 'ok'){
|
|
|
|
+ this.userCustomConfig = JSON.parse(JSON.stringify(res.data))
|
|
|
|
+ for(let i in this.userCustomConfig){
|
|
|
|
+ if(this.userCustomConfig[i].type == 0){
|
|
|
|
+ if(this.insertForm[this.suoying[i]]){this.insertForm[this.suoying[i]] = this.insertForm[this.suoying[i]]*1}
|
|
|
|
+ this.http.post('/sub-user-custom/list',{
|
|
|
|
+ userCustomId: this.userCustomConfig[i].id
|
|
|
|
+ },res => {
|
|
|
|
+ if(res.code == 'ok'){
|
|
|
|
+ // this.userCustomConfig[i].itemList = res.data
|
|
|
|
+ this.$set(this.userCustomConfig[i],'itemList',res.data)
|
|
|
|
+ }else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },err => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: err,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ // let opt = this.users[0].plateMap[this.userCustomConfig[0].name]
|
|
|
|
+ console.log('userCustomConfig',this.userCustomConfig);
|
|
|
|
+ console.log('insertForm',this.insertForm);
|
|
|
|
+ })
|
|
|
|
+ }else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },err => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: err,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ customConfigListAdd(){
|
|
|
|
+ this.customConfigList.push({
|
|
|
|
+ name: '',
|
|
|
|
+ type: 1
|
|
|
|
+ })
|
|
|
|
+ },
|
|
// 批量修改部门
|
|
// 批量修改部门
|
|
handleSelectionZzjg(e){
|
|
handleSelectionZzjg(e){
|
|
// if (e.length == 0) {
|
|
// if (e.length == 0) {
|
|
@@ -1002,7 +1361,10 @@
|
|
}
|
|
}
|
|
);
|
|
);
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ importUserC(){
|
|
|
|
+ this.importDialog = true
|
|
|
|
+ },
|
|
// 批量导入人员
|
|
// 批量导入人员
|
|
importUser(item) {
|
|
importUser(item) {
|
|
//首先判断文件类型
|
|
//首先判断文件类型
|
|
@@ -1017,9 +1379,10 @@
|
|
this.listLoading = true;
|
|
this.listLoading = true;
|
|
let formData = new FormData();
|
|
let formData = new FormData();
|
|
formData.append("file", item.file);
|
|
formData.append("file", item.file);
|
|
-
|
|
|
|
|
|
+ this.importingData = true
|
|
this.http.uploadFile( this.port.manage.import, formData,
|
|
this.http.uploadFile( this.port.manage.import, formData,
|
|
res => {
|
|
res => {
|
|
|
|
+ this.importingData = false
|
|
this.$refs.upload.clearFiles();
|
|
this.$refs.upload.clearFiles();
|
|
this.listLoading = false;
|
|
this.listLoading = false;
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
@@ -1037,6 +1400,7 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
error => {
|
|
error => {
|
|
|
|
+ this.importingData = false
|
|
this.$refs.upload.clearFiles();
|
|
this.$refs.upload.clearFiles();
|
|
this.listLoading = false;
|
|
this.listLoading = false;
|
|
this.$message({
|
|
this.$message({
|
|
@@ -1171,8 +1535,15 @@
|
|
costApplyDate: res.data.costApplyDate,
|
|
costApplyDate: res.data.costApplyDate,
|
|
inductionDate: res.data.inductionDate,
|
|
inductionDate: res.data.inductionDate,
|
|
position: res.data.position,
|
|
position: res.data.position,
|
|
- certJson: res.data.certList
|
|
|
|
|
|
+ certJson: res.data.certList,
|
|
|
|
+ plateMap: {},
|
|
|
|
+ plate1: res.data.plate1,
|
|
|
|
+ plate2: res.data.plate2,
|
|
|
|
+ plate3: res.data.plate3,
|
|
|
|
+ plate4: res.data.plate4,
|
|
|
|
+ plate5: res.data.plate5,
|
|
};
|
|
};
|
|
|
|
+ this.getUserCustomConfig(1)
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -1204,8 +1575,17 @@
|
|
inductionDate: util.formatDate.format(new Date(), 'yyyy-MM-dd'),
|
|
inductionDate: util.formatDate.format(new Date(), 'yyyy-MM-dd'),
|
|
position: '',
|
|
position: '',
|
|
certJson: [],
|
|
certJson: [],
|
|
|
|
+ plateMap: {},
|
|
|
|
+ plate1: null,
|
|
|
|
+ plate2: null,
|
|
|
|
+ plate3: null,
|
|
|
|
+ plate4: null,
|
|
|
|
+ plate5: null,
|
|
};
|
|
};
|
|
this.title = "新增人员"
|
|
this.title = "新增人员"
|
|
|
|
+ this.getUserCustomConfig()
|
|
|
|
+ // this.insertForm.plateMap['定义测试文本'] = '测试文本'
|
|
|
|
+ console.log('insertForm123',this.insertForm);
|
|
}
|
|
}
|
|
this.dialogVisible = true;
|
|
this.dialogVisible = true;
|
|
},
|
|
},
|
|
@@ -1249,8 +1629,23 @@
|
|
position: this.insertForm.position,
|
|
position: this.insertForm.position,
|
|
certJson: JSON.stringify(this.insertForm.certJson),
|
|
certJson: JSON.stringify(this.insertForm.certJson),
|
|
// certJson: this.insertForm.certJson
|
|
// certJson: this.insertForm.certJson
|
|
- inductionDate: this.insertForm.inductionDate
|
|
|
|
|
|
+ inductionDate: this.insertForm.inductionDate,
|
|
|
|
+ plate1: this.insertForm.plate1,
|
|
|
|
+ plate2: this.insertForm.plate2,
|
|
|
|
+ plate3: this.insertForm.plate3,
|
|
|
|
+ plate4: this.insertForm.plate4,
|
|
|
|
+ plate5: this.insertForm.plate5,
|
|
};
|
|
};
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ // for(let i=0;i<5;i++) {
|
|
|
|
+ // if(this.insertFormPlates[i]){
|
|
|
|
+ // form[this.suoying[i]] = this.insertFormPlates[i]
|
|
|
|
+ // }
|
|
|
|
+ // }
|
|
|
|
+
|
|
|
|
+ console.log(form, 'form')
|
|
|
|
+
|
|
if (this.insertForm.id != null) {
|
|
if (this.insertForm.id != null) {
|
|
form.id = this.insertForm.id;
|
|
form.id = this.insertForm.id;
|
|
}
|
|
}
|