Prechádzať zdrojové kódy

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	src/views/modules/sys/userInfo/UserInfoList.vue
lizhenhao 2 rokov pred
rodič
commit
7c95850557

+ 233 - 290
src/views/modules/sys/userInfo/UserInfoForm.vue

@@ -58,7 +58,7 @@
                           :rules="[
                   {required: true, message:'请输入身份证号码', trigger:'blur'}
                  ]">
-              <el-input v-model="inputForm.idCard"></el-input>
+              <el-input v-model="inputForm.idCard" @input="validID(null, inputForm.idCard)"></el-input>
             </el-form-item>
           </el-col>
 
@@ -267,11 +267,11 @@
           </el-col>
 
           <el-col :span="10">
-            <el-form-item label="岗位" prop="position"
+            <el-form-item label="岗位" prop="positions"
                           :rules="[
                             {required: true, message: '请选择岗位', trigger: 'blur'}
                             ]">
-              <el-select v-model="inputForm.position" style="width:100%" multiple placeholder="请选择岗位">
+              <el-select v-model="inputForm.positions" style="width:100%" multiple placeholder="请选择岗位">
                 <el-option
                   v-for="item in postList"
                   :key="item.id"
@@ -313,8 +313,8 @@
         <el-form-item label="头像" prop="headPortraitUrl">
           <el-upload
             class="avatar-uploader"
-            :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=logo`"
-            :on-success="handleAvatarSuccess"
+            :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=headPortraitUrl`"
+            :on-success="handleAvatarSuccess1"
             :before-upload="beforeAvatarUpload"
             :show-file-list="false">
             <img v-if="inputForm.headPortraitUrl" :src="inputForm.headPortraitUrl" class="avatar">
@@ -325,8 +325,8 @@
         <el-form-item label="手签章" prop="signatureUrl">
           <el-upload
             class="avatar-uploader"
-            :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=logo`"
-            :on-success="handleAvatarSuccess"
+            :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=signatureUrl`"
+            :on-success="handleAvatarSuccess2"
             :before-upload="beforeAvatarUpload"
             :show-file-list="false">
             <img v-if="inputForm.signatureUrl" :src="inputForm.signatureUrl" class="avatar">
@@ -349,6 +349,7 @@
           class="vxe-table-element"
           :data="sysUserEducations"
           style="margin-left: 5em"
+          height="500"
           @cell-click="dbclickFun"
           @edit-closed=""
           highlight-current-row
@@ -365,70 +366,58 @@
               <el-input v-model="scope.row.major" ></el-input>
             </template>
           </vxe-table-column>
-          <vxe-table-column field="education" title="学历" :edit-render="{}">
+          <vxe-table-column field="education" title="学历" :edit-render="{name: '$select'}">
             <template v-slot:edit="scope" >
-              <el-select v-model="scope.row.education">
-                <el-option
+              <vxe-select v-model="scope.row.education">
+                <vxe-option
                   v-for="item in $dictUtils.getDictList('sys_user_education')"
                   :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
+                  :value="item.value"
+                  :label="item.label">
+                </vxe-option>
+              </vxe-select>
             </template>
           </vxe-table-column>
           <vxe-table-column field="degree" title="学位" :edit-render="{}">
             <template v-slot:edit="scope" >
-              <el-select v-model="scope.row.degree">
-                <el-option
+              <vxe-select v-model="scope.row.degree">
+                <vxe-option
                   v-for="item in $dictUtils.getDictList('sys_user_degree')"
                   :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
+                  :value="item.value"
+                  :label="item.label">
+                </vxe-option>
+              </vxe-select>
             </template>
           </vxe-table-column>
           <vxe-table-column field="educationType" title="学历性质" :edit-render="{}">
             <template v-slot:edit="scope" >
-              <el-select v-model="scope.row.educationType">
-                <el-option
+              <vxe-select v-model="scope.row.educationType">
+                <vxe-option
                   v-for="item in $dictUtils.getDictList('sys_user_education_type')"
                   :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
+                  :value="item.value"
+                  :label="item.label">
+                </vxe-option>
+              </vxe-select>
             </template>
           </vxe-table-column>
           <vxe-table-column field="entranceDate" title="入学日期" :edit-render="{}">
             <template v-slot:edit="scope" >
-              <el-date-picker
-                v-model="scope.row.entranceDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
+              <vxe-input v-model="scope.row.entranceDate" placeholder="入学日期" type="date"></vxe-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="graduationDate" title="毕业日期" :edit-render="{}">
             <template v-slot:edit="scope" >
-              <el-date-picker
-                v-model="scope.row.graduationDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
+              <vxe-input v-model="scope.row.graduationDate" placeholder="毕业日期" type="date"></vxe-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="educationCertificateUrl" title="学历证书" :edit-render="{}">
             <template v-slot:edit="scope" >
               <el-upload
                 class="avatar-uploader"
-                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=logo`"
-                :on-success="handleAvatarSuccess"
+                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=educationCertificateUrl`"
+                :on-success="handleAvatarSuccess3"
                 :before-upload="beforeAvatarUpload"
                 :show-file-list="false">
                 <img v-if="scope.row.educationCertificateUrl" :src="scope.row.educationCertificateUrl" class="avatar">
@@ -440,8 +429,8 @@
             <template v-slot:edit="scope" >
               <el-upload
                 class="avatar-uploader"
-                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=logo`"
-                :on-success="handleAvatarSuccess"
+                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=degreeCertificateUrl`"
+                :on-success="handleAvatarSuccess4"
                 :before-upload="beforeAvatarUpload"
                 :show-file-list="false">
                 <img v-if="scope.row.degreeCertificateUrl" :src="scope.row.degreeCertificateUrl" class="avatar">
@@ -471,6 +460,7 @@
           class="vxe-table-element"
           :data="sysUserContracts"
           style="margin-left: 5em"
+          height="500"
           @cell-click="dbclickFun"
           @edit-closed=""
           highlight-current-row
@@ -494,54 +484,30 @@
         </vxe-table-column>
         <vxe-table-column field="contractBeginDate" title="合同起始日期" :edit-render="{}">
           <template v-slot:edit="scope">
-            <el-date-picker
-              v-model="scope.row.contractBeginDate"
-              type="date"
-              value-format="yyyy-MM-dd"
-              format="yyyy-MM-dd"
-            >
-            </el-date-picker>
+            <vxe-input v-model="scope.row.contractBeginDate" placeholder="合同起始日期" type="date"></vxe-input>
           </template>
         </vxe-table-column>
         <vxe-table-column field="contractEndDate" title="合同终止日期" :edit-render="{}">
           <template v-slot:edit="scope">
-            <el-date-picker
-              v-model="scope.row.contractEndDate"
-              type="date"
-              value-format="yyyy-MM-dd"
-              format="yyyy-MM-dd"
-            >
-            </el-date-picker>
+            <vxe-input v-model="scope.row.contractEndDate" placeholder="合同终止日期" type="date"></vxe-input>
           </template>
         </vxe-table-column>
         <vxe-table-column field="probationEndDate" title="试用期结束日期" :edit-render="{}">
           <template v-slot:edit="scope">
-            <el-date-picker
-              v-model="scope.row.probationEndDate"
-              type="date"
-              value-format="yyyy-MM-dd"
-              format="yyyy-MM-dd"
-            >
-            </el-date-picker>
+            <vxe-input v-model="scope.row.probationEndDate" placeholder="试用期结束日期" type="date"></vxe-input>
           </template>
         </vxe-table-column>
         <vxe-table-column field="processingDate" title="办理日期" :edit-render="{}">
           <template v-slot:edit="scope">
-            <el-date-picker
-              v-model="scope.row.processingDate"
-              type="date"
-              value-format="yyyy-MM-dd"
-              format="yyyy-MM-dd"
-            >
-            </el-date-picker>
+            <vxe-input v-model="scope.row.processingDate" placeholder="办理日期" type="date"></vxe-input>
           </template>
         </vxe-table-column>
           <vxe-table-column field="fileUrl" title="文件" :edit-render="{}">
             <template v-slot:edit="scope" >
               <el-upload
                 class="avatar-uploader"
-                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=logo`"
-                :on-success="handleAvatarSuccess"
+                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=fileUrl`"
+                :on-success="handleAvatarSuccess5"
                 :before-upload="beforeAvatarUpload"
                 :show-file-list="false">
                 <img v-if="scope.row.fileUrl" :src="scope.row.fileUrl" class="avatar">
@@ -570,6 +536,7 @@
           class="vxe-table-element"
           :data="sysUserLanguages"
           style="margin-left: 5em"
+          height="500"
           @cell-click="dbclickFun"
           @edit-closed=""
           highlight-current-row
@@ -577,26 +544,26 @@
         >
           <vxe-table-column field="languages" title="语种" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-select v-model="scope.row.languages">
-                <el-option
+              <vxe-select v-model="scope.row.languages">
+                <vxe-option
                   v-for="item in $dictUtils.getDictList('sys_user_languages')"
                   :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
+                  :value="item.value"
+                  :label="item.label">
+                </vxe-option>
+              </vxe-select>
             </template>
           </vxe-table-column>
           <vxe-table-column field="level" title="熟练程度" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-select v-model="scope.row.level">
-                <el-option
+              <vxe-select v-model="scope.row.level">
+                <vxe-option
                   v-for="item in $dictUtils.getDictList('sys_user_proficiency')"
                   :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
+                  :value="item.value"
+                  :label="item.label">
+                </vxe-option>
+              </vxe-select>
             </template>
           </vxe-table-column>
           <vxe-table-column field="certificateName" title="证书名称" :edit-render="{}">
@@ -606,32 +573,15 @@
           </vxe-table-column>
           <vxe-table-column field="getDate" title="获证日期" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-date-picker
-                v-model="scope.row.getDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
-            </template>
-          </vxe-table-column>
-          <vxe-table-column field="contractEndDate" title="合同终止日期" :edit-render="{}">
-            <template v-slot:edit="scope">
-              <el-date-picker
-                v-model="scope.row.contractEndDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
+              <vxe-input v-model="scope.row.getDate" placeholder="获证日期" type="date"></vxe-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="fileUrl" title="文件" :edit-render="{}">
             <template v-slot:edit="scope" >
               <el-upload
                 class="avatar-uploader"
-                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=logo`"
-                :on-success="handleAvatarSuccess"
+                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=fileUrl`"
+                :on-success="handleAvatarSuccess6"
                 :before-upload="beforeAvatarUpload"
                 :show-file-list="false">
                 <img v-if="scope.row.fileUrl" :src="scope.row.fileUrl" class="avatar">
@@ -660,6 +610,7 @@
           class="vxe-table-element"
           :data="sysUserWorks"
           style="margin-left: 5em"
+          height="500"
           @cell-click="dbclickFun"
           @edit-closed=""
           highlight-current-row
@@ -682,24 +633,12 @@
           </vxe-table-column>
           <vxe-table-column field="beginDate" title="起始日期" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-date-picker
-                v-model="scope.row.beginDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
+              <vxe-input v-model="scope.row.beginDate" placeholder="起始日期" type="date"></vxe-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="endDate" title="终止日期" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-date-picker
-                v-model="scope.row.endDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
+              <vxe-input v-model="scope.row.endDate" placeholder="终止日期" type="date"></vxe-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="witness" title="证明人" :edit-render="{}">
@@ -733,6 +672,7 @@
           class="vxe-table-element"
           :data="sysUserCertificates"
           style="margin-left: 5em"
+          height="500"
           @cell-click="dbclickFun"
           @edit-closed=""
           highlight-current-row
@@ -740,14 +680,14 @@
         >
           <vxe-table-column field="certificateName" title="证书名称" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-select v-model="scope.row.certificateName">
-                <el-option
+              <vxe-select v-model="scope.row.certificateName">
+                <vxe-option
                   v-for="item in $dictUtils.getDictList('sys_user_certificate_name')"
                   :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
+                  :value="item.value"
+                  :label="item.label">
+                </vxe-option>
+              </vxe-select>
             </template>
           </vxe-table-column>
           <vxe-table-column field="certificateNumber" title="证书编码" :edit-render="{}">
@@ -757,24 +697,12 @@
           </vxe-table-column>
           <vxe-table-column field="regineDate" title="注册日期" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-date-picker
-                v-model="scope.row.regineDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
+              <vxe-input v-model="scope.row.regineDate" placeholder="注册日期" type="date"></vxe-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="issueDate" title="发证日期" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-date-picker
-                v-model="scope.row.issueDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
+              <vxe-input v-model="scope.row.issueDate" placeholder="发证日期" type="date"></vxe-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="issuingAuthority" title="发证机关" :edit-render="{}">
@@ -784,22 +712,22 @@
           </vxe-table-column>
           <vxe-table-column field="major" title="专业" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-select v-model="scope.row.major">
-                <el-option
+              <vxe-select v-model="scope.row.major">
+                <vxe-option
                   v-for="item in $dictUtils.getDictList('sys_user_major')"
                   :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
+                  :value="item.value"
+                  :label="item.label">
+                </vxe-option>
+              </vxe-select>
             </template>
           </vxe-table-column>
           <vxe-table-column field="fileUrl" title="文件" :edit-render="{}">
             <template v-slot:edit="scope" >
               <el-upload
                 class="avatar-uploader"
-                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=logo`"
-                :on-success="handleAvatarSuccess"
+                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=fileUrl`"
+                :on-success="handleAvatarSuccess7"
                 :before-upload="beforeAvatarUpload"
                 :show-file-list="false">
                 <img v-if="scope.row.fileUrl" :src="scope.row.fileUrl" class="avatar">
@@ -828,6 +756,7 @@
           class="vxe-table-element"
           :data="sysUserTitles"
           style="margin-left: 5em"
+          height="500"
           @cell-click="dbclickFun"
           @edit-closed=""
           highlight-current-row
@@ -845,13 +774,7 @@
           </vxe-table-column>
           <vxe-table-column field="getDate" title="取得日期" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-date-picker
-                v-model="scope.row.getDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
+              <vxe-input v-model="scope.row.getDate" placeholder="取得日期" type="date"></vxe-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="getAccess" title="取得途径" :edit-render="{}">
@@ -868,8 +791,8 @@
             <template v-slot:edit="scope" >
               <el-upload
                 class="avatar-uploader"
-                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=logo`"
-                :on-success="handleAvatarSuccess"
+                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=fileUrl`"
+                :on-success="handleAvatarSuccess8"
                 :before-upload="beforeAvatarUpload"
                 :show-file-list="false">
                 <img v-if="scope.row.fileUrl" :src="scope.row.fileUrl" class="avatar">
@@ -898,6 +821,7 @@
           class="vxe-table-element"
           :data="sysUserFamilys"
           style="margin-left: 5em"
+          height="500"
           @cell-click="dbclickFun"
           @edit-closed=""
           highlight-current-row
@@ -920,14 +844,14 @@
           </vxe-table-column>
           <vxe-table-column field="sex" title="成员性别" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-select v-model="scope.row.sex" placeholder="请选择性别" style="width:100%;">
-                <el-option
+              <vxe-select v-model="scope.row.sex">
+                <vxe-option
                   v-for="item in $dictUtils.getDictList('sex')"
                   :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
+                  :value="item.value"
+                  :label="item.label">
+                </vxe-option>
+              </vxe-select>
             </template>
           </vxe-table-column>
           <vxe-table-column field="linkmanPhone" title="成员联系方式" :edit-render="{}">
@@ -956,6 +880,7 @@
           class="vxe-table-element"
           :data="sysUserTrains"
           style="margin-left: 5em"
+          height="500"
           @cell-click="dbclickFun"
           @edit-closed=""
           highlight-current-row
@@ -978,36 +903,24 @@
           </vxe-table-column>
           <vxe-table-column field="trainBeginDate" title="培训起始日期" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-date-picker
-                v-model="scope.row.trainBeginDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
+              <vxe-input v-model="scope.row.trainBeginDate" placeholder="培训起始日期" type="date"></vxe-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="trainEndDate" title="培训终止日期" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-date-picker
-                v-model="scope.row.trainEndDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
+              <vxe-input v-model="scope.row.trainEndDate" placeholder="培训终止日期" type="date"></vxe-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="trainLevel" title="培训类型" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-select v-model="scope.row.trainLevel" placeholder="请选择培训类型" style="width:100%;">
-                <el-option
+              <vxe-select v-model="scope.row.trainLevel">
+                <vxe-option
                   v-for="item in $dictUtils.getDictList('sys_user_training_type')"
                   :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
+                  :value="item.value"
+                  :label="item.label">
+                </vxe-option>
+              </vxe-select>
             </template>
           </vxe-table-column>
           <vxe-table-column field="time" title="学时" :edit-render="{}">
@@ -1024,8 +937,8 @@
             <template v-slot:edit="scope" >
               <el-upload
                 class="avatar-uploader"
-                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=logo`"
-                :on-success="handleAvatarSuccess"
+                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=fileUrl`"
+                :on-success="handleAvatarSuccess9"
                 :before-upload="beforeAvatarUpload"
                 :show-file-list="false">
                 <img v-if="scope.row.fileUrl" :src="scope.row.fileUrl" class="avatar">
@@ -1059,6 +972,7 @@
           class="vxe-table-element"
           :data="sysUserDuties"
           style="margin-left: 5em"
+          height="500"
           @cell-click="dbclickFun"
           @edit-closed=""
           highlight-current-row
@@ -1071,24 +985,12 @@
           </vxe-table-column>
           <vxe-table-column field="postBeginDate" title="任职开始日期" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-date-picker
-                v-model="scope.row.postBeginDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
+              <vxe-input v-model="scope.row.postBeginDate" placeholder="任职开始日期" type="date"></vxe-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="postEndDate" title="任职结束日期" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-date-picker
-                v-model="scope.row.postEndDate"
-                type="date"
-                value-format="yyyy-MM-dd"
-                format="yyyy-MM-dd"
-              >
-              </el-date-picker>
+              <vxe-input v-model="scope.row.postEndDate" placeholder="任职结束日期" type="date"></vxe-input>
             </template>
           </vxe-table-column>
           <vxe-table-column field="postOffice" title="任职机构" :edit-render="{}">
@@ -1117,6 +1019,7 @@
           class="vxe-table-element"
           :data="sysUserRewards"
           style="margin-left: 5em"
+          height="500"
           @cell-click="dbclickFun"
           @edit-closed=""
           highlight-current-row
@@ -1124,14 +1027,14 @@
         >
           <vxe-table-column field="rewardsType" title="奖惩类型" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-select v-model="scope.row.rewardsType" placeholder="请选择奖惩类型" style="width:100%;">
-                <el-option
+              <vxe-select v-model="scope.row.rewardsType">
+                <vxe-option
                   v-for="item in $dictUtils.getDictList('sys_user_rewards')"
                   :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
+                  :value="item.value"
+                  :label="item.label">
+                </vxe-option>
+              </vxe-select>
             </template>
           </vxe-table-column>
           <vxe-table-column field="rewardsName" title="奖惩名称" :edit-render="{}">
@@ -1180,6 +1083,7 @@
           class="vxe-table-element"
           :data="sysUserAchievements"
           style="margin-left: 5em"
+          height="500"
           @cell-click="dbclickFun"
           @edit-closed=""
           highlight-current-row
@@ -1207,14 +1111,14 @@
           </vxe-table-column>
           <vxe-table-column field="post" title="担任职务" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-select v-model="scope.row.post" placeholder="请选择担任职务" style="width:100%;">
-                <el-option
+              <vxe-select v-model="scope.row.post">
+                <vxe-option
                   v-for="item in $dictUtils.getDictList('sys_user_post')"
                   :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
+                  :value="item.value"
+                  :label="item.label">
+                </vxe-option>
+              </vxe-select>
             </template>
           </vxe-table-column>
           <vxe-table-column field="content" title="参与内容" :edit-render="{}">
@@ -1243,6 +1147,7 @@
           class="vxe-table-element"
           :data="sysUserArchives"
           style="margin-left: 5em"
+          height="500"
           @cell-click="dbclickFun"
           @edit-closed=""
           highlight-current-row
@@ -1250,14 +1155,14 @@
         >
           <vxe-table-column field="projectName" title="项目名称" :edit-render="{}">
             <template v-slot:edit="scope">
-              <el-select v-model="scope.row.projectName" placeholder="请选择项目名称" style="width:100%;">
-                <el-option
+              <vxe-select v-model="scope.row.projectName">
+                <vxe-option
                   v-for="item in $dictUtils.getDictList('sys_user_archives')"
                   :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
+                  :value="item.value"
+                  :label="item.label">
+                </vxe-option>
+              </vxe-select>
             </template>
           </vxe-table-column>
           <vxe-table-column field="archivesNo" title="编号" :edit-render="{}">
@@ -1269,8 +1174,8 @@
             <template v-slot:edit="scope" >
               <el-upload
                 class="avatar-uploader"
-                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=logo`"
-                :on-success="handleAvatarSuccess"
+                :action="`${$http.BASE_URL}/sys/file/webupload/upload?uploadPath=fileUrl`"
+                :on-success="handleAvatarSuccess10"
                 :before-upload="beforeAvatarUpload"
                 :show-file-list="false">
                 <img v-if="scope.row.fileUrl" :src="scope.row.fileUrl" class="avatar">
@@ -1363,7 +1268,8 @@
           probationTime: '',
           probationEndDate: '',
           department: '',
-          position: [],
+          position: '',
+          positions: [],
           highestEducation: '',
           remarks: '',
           personalProfile: '',
@@ -1508,8 +1414,35 @@
       this.postService = new PostService()
     },
     methods: {
-      handleAvatarSuccess (res, file) {
-        this.themeFormSetting.logo = res.url
+      handleAvatarSuccess1 (res, file) {
+        this.inputForm.headPortraitUrl = res.url
+      },
+      handleAvatarSuccess2 (res, file) {
+        this.inputForm.signatureUrl = res.url
+      },
+      handleAvatarSuccess3 (res, file) {
+        this.sysUserEducation.educationCertificateUrl = res.url
+      },
+      handleAvatarSuccess4 (res, file) {
+        this.sysUserEducation.degreeCertificateUrl = res.url
+      },
+      handleAvatarSuccess5 (res, file) {
+        this.sysUserContract.fileUrl = res.url
+      },
+      handleAvatarSuccess6 (res, file) {
+        this.sysUserLanguage.fileUrl = res.url
+      },
+      handleAvatarSuccess7 (res, file) {
+        this.sysUserCertificate.fileUrl = res.url
+      },
+      handleAvatarSuccess8 (res, file) {
+        this.sysUserTitle.fileUrl = res.url
+      },
+      handleAvatarSuccess9 (res, file) {
+        this.sysUserTrain.fileUrl = res.url
+      },
+      handleAvatarSuccess10 (res, file) {
+        this.sysUserArchives.fileUrl = res.url
       },
 
       beforeAvatarUpload (file) {
@@ -1517,10 +1450,12 @@
         const isLt2M = file.size / 1024 / 1024 < 2
 
         if (!isJPG) {
+          console.log('上传LOGO只能是图片格式!')
           this.$message.error('上传LOGO只能是图片格式!')
           return false
         }
         if (!isLt2M) {
+          console.log('上传LOGO大小不能超过 2MB!')
           this.$message.error('上传LOGO大小不能超过 2MB!')
           return false
         }
@@ -1610,7 +1545,8 @@
           probationTime: '',
           probationEndDate: '',
           department: '',
-          position: [],
+          position: '',
+          positions: [],
           highestEducation: '',
           remarks: '',
           personalProfile: '',
@@ -1735,39 +1671,10 @@
           rowurl: '',
           src: '',
           showVi: true,
-          type: '',
-          workClientInfo: {
-            name: '',
-            lawerPresintnamename: '',
-            lawerPresint: '',
-            orUnicode: '',
-            companyType: '',
-            companyIndustry: '',
-            clientType: '',
-            creditRank: '',
-            areaId: '',
-            zipCode: '',
-            fax: '',
-            taxId: '',
-            email: '',
-            address: '',
-            registerAddress: '',
-            companyUrl: '',
-            remarks: '',
-            companyId: '',
-            officeId: '',
-            areaParentIds: '',
-            telephone: '',
-            hasUscc: '',
-            uscCode: '',
-            number: '',
-            deputy: '',
-            deputyList: []
-          }
+          type: ''
         }
         this.inputForm.id = id
         if (method === 'add') {
-          this.inputForm.workClientInfo.hasUscc = '1'
           this.inputForm.permissionFlag = true
           this.title = `新建客户信息`
         } else if (method === 'edit') {
@@ -1823,17 +1730,13 @@
               data.sysUserArchives.forEach(i => {
                 this.sysUserArchives.push(i)
               })
-              // const deputyList = []
-              // if (data.workClientInfo.deputy !== null && data.workClientInfo.deputy !== undefined && data.workClientInfo.deputy !== '') {
-              //   data.workClientInfo.deputy.split(',').forEach(item => {
-              //     deputyList.push(item)
-              //   })
-              // }
-              // this.inputForm.workClientInfo = JSON.parse(JSON.stringify(data.workClientInfo))
-              // this.inputForm.permissionFlag = true
-              // this.inputForm.workClientInfo.deputyList = deputyList
-              // this.inputForm.workClientInfo = JSON.parse(JSON.stringify(this.inputForm.workClientInfo))
-              // this.inputForm.workClientInfo.hasUscc = JSON.stringify(this.inputForm.workClientInfo.hasUscc)
+              const p = []
+              if (data.position !== null && data.position !== undefined && data.position !== '') {
+                data.position.split(',').forEach(item => {
+                  p.push(item)
+                })
+              }
+              this.inputForm.positions = p
             })
           }
           this.loading = false
@@ -1845,55 +1748,57 @@
           if (valid) {
             this.loading = true
 
-            this.inputForm.sysUserEducation = []
+            this.inputForm.sysUserEducations = []
             this.sysUserEducations.forEach((item) => {
-              this.inputForm.sysUserEducation.push(item)
+              this.inputForm.sysUserEducations.push(item)
             })
-            this.inputForm.sysUserContract = []
+            this.inputForm.sysUserContracts = []
             this.sysUserContracts.forEach((item) => {
-              this.inputForm.sysUserContract.push(item)
+              this.inputForm.sysUserContracts.push(item)
             })
-            this.inputForm.sysUserLanguage = []
+            this.inputForm.sysUserLanguages = []
             this.sysUserLanguages.forEach((item) => {
-              this.inputForm.sysUserLanguage.push(item)
+              this.inputForm.sysUserLanguages.push(item)
             })
-            this.inputForm.sysUserWork = []
+            this.inputForm.sysUserWorks = []
             this.sysUserWorks.forEach((item) => {
-              this.inputForm.sysUserWork.push(item)
+              this.inputForm.sysUserWorks.push(item)
             })
-            this.inputForm.sysUserCertificate = []
+            this.inputForm.sysUserCertificates = []
             this.sysUserCertificates.forEach((item) => {
-              this.inputForm.sysUserCertificate.push(item)
+              this.inputForm.sysUserCertificates.push(item)
             })
-            this.inputForm.sysUserTitle = []
+            this.inputForm.sysUserTitles = []
             this.sysUserTitles.forEach((item) => {
-              this.inputForm.sysUserTitle.push(item)
+              this.inputForm.sysUserTitles.push(item)
             })
-            this.inputForm.sysUserFamily = []
+            this.inputForm.sysUserFamilies = []
             this.sysUserFamilys.forEach((item) => {
-              this.inputForm.sysUserFamily.push(item)
+              this.inputForm.sysUserFamilies.push(item)
             })
-            this.inputForm.sysUserTrain = []
+            this.inputForm.sysUserTrains = []
             this.sysUserTrains.forEach((item) => {
-              this.inputForm.sysUserTrain.push(item)
+              this.inputForm.sysUserTrains.push(item)
             })
-            this.inputForm.sysUserDutie = []
+            this.inputForm.sysUserDuties = []
             this.sysUserDuties.forEach((item) => {
-              this.inputForm.sysUserDutie.push(item)
+              this.inputForm.sysUserDuties.push(item)
             })
-            this.inputForm.sysUserReward = []
+            this.inputForm.sysUserRewards = []
             this.sysUserRewards.forEach((item) => {
-              this.inputForm.sysUserReward.push(item)
+              this.inputForm.sysUserRewards.push(item)
             })
-            this.inputForm.sysUserAchievement = []
+            this.inputForm.sysUserAchievements = []
             this.sysUserAchievements.forEach((item) => {
-              this.inputForm.sysUserAchievement.push(item)
+              this.inputForm.sysUserAchievements.push(item)
             })
-            this.inputForm.sysUserArchive = []
+            this.inputForm.sysUserArchives = []
             this.sysUserArchives.forEach((item) => {
-              this.inputForm.sysUserArchive.push(item)
+              this.inputForm.sysUserArchives.push(item)
             })
 
+            this.inputForm.position = this.inputForm.positions.join(',')
+
             this.userInfoService.save(this.inputForm).then(({data}) => {
               this.close()
               this.$message.success(data)
@@ -1928,8 +1833,6 @@
           item.createBy = this.$store.state.user.name
           this.dataListNew.push(item)
         })
-        console.log('11', this.dataList)
-        console.log('33', this.dataListNew)
         const isLt2M = file.size / 1024 / 1024 < 300
         if (isLt2M === false) {
           this.$message.error('文件大小不能超过 ' + 300 + 'M !')
@@ -2179,6 +2082,46 @@
       },
       closePop () {
         this.visable = false
+      },
+
+      // 身份证验证
+      async validID(rule,value,callback)
+      {
+        // 身份证号码为15位或者18位,15位时全为数字,18位前17位为数字,最后一位是校验位,可能为数字或字符X
+        let reg = /(^\d{15}$)|(^\d{18}$)|(^\d{17}(\d|X|x)$)/
+        if (reg.test(value)) {
+          await this.go(value.length);
+          // callback()
+        } else {
+          // callback(new Error('身份证号码不正确'))
+        }
+      },
+
+      // 实现自动生成生日/年龄
+      go (val) {
+        let iden = this.inputForm.idCard;
+        let sex = null;
+        let birth = null;
+        let myDate = new Date();
+        let month = myDate.getMonth() + 1;
+        let day = myDate.getDate();
+        let age = 0;
+
+        if(val===18){
+          age = myDate.getFullYear() - iden.substring(6, 10) - 1;
+          sex = iden.substring(16,17);
+          birth = iden.substring(6,10)+"-"+iden.substring(10,12)+"-"+iden.substring(12,14);
+          if ((iden.substring(10, 12) < month || iden.substring(10, 12) === month) && iden.substring(12, 14) <= day) age++
+
+        }
+        if(val===15){
+          age = myDate.getFullYear() - iden.substring(6, 8) - 1901;
+          sex = iden.substring(13,14);
+          birth = "19"+iden.substring(6,8)+"-"+iden.substring(8,10)+"-"+iden.substring(10,12);
+          if ((iden.substring(8, 10) < month || iden.substring(8, 10) === month) && iden.substring(10, 12) <= day) age++
+        }
+        this.inputForm.age = age
+        this.inputForm.birthday = birth
       }
     }
   }

+ 22 - 13
src/views/modules/sys/userInfo/UserInfoList.vue

@@ -19,8 +19,8 @@
     <div class="bg-white top">
       <vxe-toolbar :refresh="{query: refreshList}" import export print custom>
         <template #buttons>
-          <el-button v-if="hasPermission('sys:project:add')" type="primary" size="small" icon="el-icon-plus" @click="add()">新建</el-button>
-          <el-button v-if="hasPermission('sys:project:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.userTable && $refs.userTable.getCheckboxRecords().length === 0" plain>删除</el-button>
+          <el-button v-if="hasPermission('sys:userInfo:add')" type="primary" size="small" icon="el-icon-plus" @click="add()">新建</el-button>
+          <el-button v-if="hasPermission('sys:userInfo:del')" type="danger"   size="small" icon="el-icon-delete" @click="del()" :disabled="$refs.userInfoTable && $refs.userInfoTable.getCheckboxRecords().length === 0" plain>删除</el-button>
         </template>
       </vxe-toolbar>
       <div style="height: calc(100% - 80px);">
@@ -31,12 +31,13 @@
           height="auto"
           :loading="loading"
           size="small"
-          ref="userTable"
+          ref="userInfoTable"
           show-header-overflow
           show-overflow
           highlight-hover-row
           :menu-config="{}"
           :print-config="{}"
+          @sort-change="sortChangeHandle"
           :sort-config="{remote:true}"
           :data="dataList"
           :checkbox-config="{}">
@@ -44,15 +45,15 @@
           <vxe-column type="checkbox"  width="40px"></vxe-column>
           <vxe-column width="100px"  title="工号" field="jobNo">
             <template slot-scope="scope">
-              <el-link  type="primary" :underline="false" v-if="hasPermission('sys:project:edit')" @click="view(scope.row.id)">{{scope.row.jobNo}}</el-link>
-              <el-link  type="primary" :underline="false" v-else-if="hasPermission('sys:project:view')"  @click="view(scope.row.id)">{{scope.row.jobNo}}</el-link>
+              <el-link  type="primary" :underline="false" v-if="hasPermission('sys:userInfo:edit')" @click="view(scope.row.id)">{{scope.row.jobNo}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('sys:userInfo:view')"  @click="view(scope.row.id)">{{scope.row.jobNo}}</el-link>
               <span v-else>{{scope.row.jobNo}}</span>
             </template>
           </vxe-column>
           <vxe-column width="100px"  title="姓名" field="name">
             <template slot-scope="scope">
-              <el-link  type="primary" :underline="false" v-if="hasPermission('sys:project:edit')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
-              <el-link  type="primary" :underline="false" v-else-if="hasPermission('sys:project:view')"  @click="view(scope.row.id)">{{scope.row.name}}</el-link>
+              <el-link  type="primary" :underline="false" v-if="hasPermission('sys:userInfo:edit')" @click="view(scope.row.id)">{{scope.row.name}}</el-link>
+              <el-link  type="primary" :underline="false" v-else-if="hasPermission('sys:userInfo:view')"  @click="view(scope.row.id)">{{scope.row.name}}</el-link>
               <span v-else>{{scope.row.name}}</span>
             </template>
           </vxe-column>
@@ -65,9 +66,9 @@
 
           <vxe-column title="操作" width="200px" fixed="right" align="center">
             <template  slot-scope="scope">
-              <el-button v-if="hasPermission('sys:work_client:view')" type="text" icon="el-icon-view" size="small" @click="view(scope.row.id)">查看</el-button>
-              <el-button v-if="hasPermission('sys:work_client:edit') " type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">修改</el-button>
-              <el-button v-if="hasPermission('sys:work_client:del') " type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
+              <el-button v-if="hasPermission('sys:userInfo:view')" type="text" icon="el-icon-view" size="small" @click="view(scope.row.id)">查看</el-button>
+              <el-button v-if="hasPermission('sys:userInfo:edit') " type="text" icon="el-icon-edit" size="small" @click="edit(scope.row.id)">修改</el-button>
+              <el-button v-if="hasPermission('sys:userInfo:del') " type="text"  icon="el-icon-delete" size="small" @click="del(scope.row.id)">删除</el-button>
             </template>
           </vxe-column>
         </vxe-table>
@@ -132,6 +133,14 @@
       },
       renderContent (h, { node, data, store }) {
       },
+      // 排序
+      sortChangeHandle (column) {
+        this.tablePage.orders = []
+        if (column.order != null) {
+          this.tablePage.orders.push({column: this.$utils.toLine(column.property), asc: column.order === 'asc'})
+        }
+        this.refreshList()
+      },
       // 获取数据列表
       refreshList () {
         this.loading = true
@@ -164,7 +173,7 @@
       },
       // 修改
       edit (id) {
-        id = id || this.$refs.userTable.getCheckboxRecords().map(item => {
+        id = id || this.$refs.userInfoTable.getCheckboxRecords().map(item => {
           return item.id
         })[0]
         this.$refs.userInfoForm.init('edit', id)
@@ -175,7 +184,7 @@
       },
       // 删除
       del (id) {
-        let ids = id || this.$refs.userTable.getCheckboxRecords().map(item => {
+        let ids = id || this.$refs.userInfoTable.getCheckboxRecords().map(item => {
           return item.id
         }).join(',')
         this.$confirm(`确定删除所选项吗?`, '提示', {
@@ -184,7 +193,7 @@
           type: 'warning'
         }).then(() => {
           this.loading = true
-          this.userInfoService.delete(ids).then(({data}) => {
+          this.userInfoService.remove(ids).then(({data}) => {
             this.loading = false
             this.$message.success({dangerouslyUseHTMLString: true,
               message: data})