lilinfeng 2 months ago
parent
commit
0fb83617b9

+ 2 - 2
src/utils/apiUrl.js

@@ -1,9 +1,9 @@
 module.exports = {
   // 开发环境接口配置
-  APIURl: "http://10.0.0.112:30000",
+  // APIURl: "http://10.0.0.112:30000",
   // APIURl: "http://10.21.12.137:30000",
   // APIURl: "http://192.168.103.104:58080",
-  // APIURl: "https://test.api.shidaiyun.net",
+  APIURl: "https://test.api.shidaiyun.net",
   // APIURl: "https://api.shidaiyun.net",
   // APIURl: "http://10.21.12.250:30000",
 

+ 215 - 192
src/views/governmentCloud/mdm/mdmuser/Detail.vue

@@ -1,212 +1,228 @@
 <template>
-    <el-dialog title="详情" :close-on-click-modal="false" append-to-body :visible.sync="visible"
-        :fullscreen="true" class="JNPF-dialog JNPF-dialog_center" lock-scroll>
+    <transition name="el-zoom-in-center">
         <div class="JNPF-common-layout">
             <div class="JNPF-common-layout-center">
-                <el-row class="JNPF-common-search-box" :gutter="16">
-                    <el-form @submit.native.prevent>
-                        <el-col :span="6">
-                            <el-form-item label="姓名">
-                                <el-input v-model="query.name" placeholder="请输入" clearable>
-                                </el-input>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="6">
-                            <el-form-item label="联系电话">
-                                <el-input v-model="query.mobile" placeholder="请输入" clearable>
-                                </el-input>
-                            </el-form-item>
-                        </el-col>
-                        <template v-if="showAll">
+                <div class="JNPF-preview-main flow-form-main">
+                    <!-- <div class="JNPF-common-page-header">
+                        <el-page-header @back="goBack" :content="title" />
+                  
+                    </div> -->
+                    <el-row class="JNPF-common-search-box" :gutter="16">
+                        <el-form @submit.native.prevent>
                             <el-col :span="6">
-                                <el-form-item label="人员编码">
-                                    <el-input v-model="query.code" placeholder="请输入" clearable>
+                                <el-form-item label="姓名">
+                                    <el-input v-model="query.name" placeholder="请输入" clearable>
                                     </el-input>
                                 </el-form-item>
                             </el-col>
                             <el-col :span="6">
-                                <el-form-item label="响应状态">
-                                    <JnpfSelect v-model="query.resStatus" placeholder="请选择"
-                                        clearable :options="resStatusOptions"
-                                        :props="resStatusProps" multiple>
-                                    </JnpfSelect>
+                                <el-form-item label="联系电话">
+                                    <el-input v-model="query.mobile" placeholder="请输入" clearable>
+                                    </el-input>
                                 </el-form-item>
                             </el-col>
+                            <template v-if="showAll">
+                                <el-col :span="6">
+                                    <el-form-item label="人员编码">
+                                        <el-input v-model="query.code" placeholder="请输入" clearable>
+                                        </el-input>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="6">
+                                    <el-form-item label="响应状态">
+                                        <JnpfSelect v-model="query.resStatus" placeholder="请选择"
+                                            clearable :options="resStatusOptions"
+                                            :props="resStatusProps" multiple>
+                                        </JnpfSelect>
+                                    </el-form-item>
+                                </el-col>
+                                <el-col :span="6">
+                                    <el-form-item label="响应数据版本">
+                                        <el-input v-model="query.resVersion" placeholder="请输入"
+                                            clearable>
+                                        </el-input>
+                                    </el-form-item>
+                                </el-col>
+                            </template>
                             <el-col :span="6">
-                                <el-form-item label="响应数据版本">
-                                    <el-input v-model="query.resVersion" placeholder="请输入"
-                                        clearable>
-                                    </el-input>
+                                <el-form-item>
+                                    <el-button type="primary" icon="el-icon-search"
+                                        @click="search()">查询</el-button>
+                                    <el-button icon="el-icon-refresh-right"
+                                        @click="reset()">重置</el-button>
+                                    <el-button type="text" icon="el-icon-arrow-down"
+                                        @click="showAll=true" v-if="!showAll">
+                                        展开
+                                    </el-button>
+                                    <el-button type="text" icon="el-icon-arrow-up"
+                                        @click="showAll=false" v-else>
+                                        收起
+                                    </el-button>
                                 </el-form-item>
                             </el-col>
-                        </template>
-                        <el-col :span="6">
-                            <el-form-item>
-                                <el-button type="primary" icon="el-icon-search"
-                                    @click="search()">查询</el-button>
-                                <el-button icon="el-icon-refresh-right"
-                                    @click="reset()">重置</el-button>
-                                <el-button type="text" icon="el-icon-arrow-down"
-                                    @click="showAll=true" v-if="!showAll">
-                                    展开
-                                </el-button>
-                                <el-button type="text" icon="el-icon-arrow-up"
-                                    @click="showAll=false" v-else>
-                                    收起
-                                </el-button>
-                            </el-form-item>
-                        </el-col>
-                    </el-form>
-                </el-row>
-                <div class="JNPF-common-layout-main JNPF-flex-main">
-                    <div class="JNPF-common-head">
-                        <div>
+                        </el-form>
+                        <div class="options">
+                            <el-button @click="goBack()">{{$t('common.cancelButton')}}</el-button>
                         </div>
-                        <div class="JNPF-common-head-right">
-                            <!-- <el-tooltip content="高级查询" placement="top" v-if="true">
+                    </el-row>
+                    <div class="JNPF-common-layout-main JNPF-flex-main">
+                        <div class="JNPF-common-head">
+                            <div>
+                            </div>
+                            <div class="JNPF-common-head-right">
+                                <!-- <el-tooltip content="高级查询" placement="top" v-if="true">
                                 <el-link icon="icon-ym icon-ym-filter JNPF-common-head-icon"
                                     :underline="false" @click="openSuperQuery()" />
                             </el-tooltip> -->
-                            <el-tooltip effect="dark" :content="$t('common.refresh')"
-                                placement="top">
-                                <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
-                                    :underline="false" @click="initData()" />
-                            </el-tooltip>
+                                <el-tooltip effect="dark" :content="$t('common.refresh')"
+                                    placement="top">
+                                    <el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon"
+                                        :underline="false" @click="initData()" />
+                                </el-tooltip>
+                            </div>
                         </div>
+                        <JNPF-table v-loading="listLoading" :data="list"
+                            @sort-change='handleTableSort'
+                            :header-cell-class-name="handleHeaderClass" :has-c="hasBatchBtn"
+                            :span-method="arraySpanMethod">
+                            <el-table-column prop="batchId" label="批次ID" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.batchId" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="code" label="人员编码" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.code" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="name" label="姓名" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.name" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="namePinyin" label="账户" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.namePinyin" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="personnelType" label="人员类型" align="left"
+                                show-overflow-tooltip>
+                            </el-table-column>
+                            <el-table-column prop="gender" label="性别" align="left"
+                                show-overflow-tooltip>
+                            </el-table-column>
+                            <el-table-column prop="mobile" label="联系电话" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.mobile" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="email" label="邮箱" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.email" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="jobStatus" label="岗位状态" align="left"
+                                show-overflow-tooltip>
+                            </el-table-column>
+                            <el-table-column prop="personStatus" label="人员状态" align="left"
+                                show-overflow-tooltip>
+                            </el-table-column>
+                            <el-table-column prop="unionid" label="微信unionid" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.unionid" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="organizationCode" label="所属组织编码" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.organizationCode" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="organizationName" label="所属组织名称" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.organizationName" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="departmentCode" label="部门编码" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.departmentCode" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="departmentName" label="部门名称" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.departmentName" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="itsmUserId" label="Itsm用户id" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.itsmUserId" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="itsmUserName" label="itsm用户姓名" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.itsmUserName" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="itsmUserAlias" label="itsm用户别名" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.itsmUserAlias" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="enterpriseWechat" label="企微账号" align="left"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.enterpriseWechat" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="resCode" label="响应数据编码" align="left" width="100"
+                                show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.resCode" detailed showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="resStatus" label="响应状态" align="left"
+                                show-overflow-tooltip>
+                            </el-table-column>
+                            <el-table-column prop="resMessage" label="响应数据描述" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.resMessage" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                            <el-table-column prop="resVersion" label="响应数据版本" align="left"
+                                width="100" show-overflow-tooltip>
+                                <template slot-scope="scope">
+                                    <JnpfInput v-model="scope.row.resVersion" detailed
+                                        showOverflow />
+                                </template>
+                            </el-table-column>
+                        </JNPF-table>
+                        <pagination :total="total" :page.sync="listQuery.currentPage"
+                            :limit.sync="listQuery.pageSize" @pagination="initData" />
                     </div>
-                    <JNPF-table v-loading="listLoading" :data="list" @sort-change='handleTableSort'
-                        :header-cell-class-name="handleHeaderClass" :has-c="hasBatchBtn"
-                        :span-method="arraySpanMethod">
-                        <el-table-column prop="batchId" label="批次ID" align="left"
-                            show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.batchId" detailed showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="code" label="人员编码" align="left"
-                            show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.code" detailed showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="name" label="姓名" align="left" show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.name" detailed showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="namePinyin" label="账户" align="left"
-                            show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.namePinyin" detailed showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="personnelType" label="人员类型" align="left"
-                            show-overflow-tooltip>
-                        </el-table-column>
-                        <el-table-column prop="gender" label="性别" align="left"
-                            show-overflow-tooltip>
-                        </el-table-column>
-                        <el-table-column prop="mobile" label="联系电话" align="left"
-                            show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.mobile" detailed showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="email" label="邮箱" align="left" show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.email" detailed showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="jobStatus" label="岗位状态" align="left"
-                            show-overflow-tooltip>
-                        </el-table-column>
-                        <el-table-column prop="personStatus" label="人员状态" align="left"
-                            show-overflow-tooltip>
-                        </el-table-column>
-                        <el-table-column prop="unionid" label="微信unionid" align="left" width="100"
-                            show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.unionid" detailed showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="organizationCode" label="所属组织编码" align="left"
-                            width="100" show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.organizationCode" detailed
-                                    showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="organizationName" label="所属组织名称" align="left"
-                            width="100" show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.organizationName" detailed
-                                    showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="departmentCode" label="部门编码" align="left"
-                            show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.departmentCode" detailed
-                                    showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="departmentName" label="部门名称" align="left"
-                            show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.departmentName" detailed
-                                    showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="itsmUserId" label="Itsm用户id" align="left"
-                            show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.itsmUserId" detailed showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="itsmUserName" label="itsm用户姓名" align="left"
-                            width="100" show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.itsmUserName" detailed showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="itsmUserAlias" label="itsm用户别名" align="left"
-                            width="100" show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.itsmUserAlias" detailed
-                                    showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="enterpriseWechat" label="企微账号" align="left"
-                            show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.enterpriseWechat" detailed
-                                    showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="resCode" label="响应数据编码" align="left" width="100"
-                            show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.resCode" detailed showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="resStatus" label="响应状态" align="left"
-                            show-overflow-tooltip>
-                        </el-table-column>
-                        <el-table-column prop="resMessage" label="响应数据描述" align="left" width="100"
-                            show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.resMessage" detailed showOverflow />
-                            </template>
-                        </el-table-column>
-                        <el-table-column prop="resVersion" label="响应数据版本" align="left" width="100"
-                            show-overflow-tooltip>
-                            <template slot-scope="scope">
-                                <JnpfInput v-model="scope.row.resVersion" detailed showOverflow />
-                            </template>
-                        </el-table-column>
-                    </JNPF-table>
-                    <pagination :total="total" :page.sync="listQuery.currentPage"
-                        :limit.sync="listQuery.pageSize" @pagination="initData" />
                 </div>
             </div>
             <JNPF-Form v-if="formVisible" ref="JNPFForm" @refresh="refresh" />
@@ -218,7 +234,7 @@
             <SuperQuery v-if="superQueryVisible" ref="SuperQuery" :columnOptions="superQueryJson"
                 @superQuery="superQuery" />
         </div>
-    </el-dialog>
+    </transition>
 </template>
 <script>
 import request from '@/utils/request'
@@ -354,7 +370,9 @@ export default {
             let btnsList = []
             this.hasBatchBtn = btnsList.some(o => ['batchRemove', 'batchPrint', 'download'].includes(o))
         },
-
+        goBack() {
+            this.$emit('refresh')
+        },
         treeRefresh() {
             this.keyword = ''
             this.treeActiveId = ''
@@ -685,4 +703,9 @@ export default {
 .tableContainer {
     flex: 1;
 }
+.JNPF-common-search-box {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+}
 </style>

+ 20 - 5
src/views/governmentCloud/questionnaireInvestigation/Statistics.vue

@@ -58,7 +58,15 @@
                         </el-table-column>
                         <el-table-column prop="" label="题目类型" align="center" show-overflow-tooltip>
                             <template slot-scope="scope">
-                                <span>{{ getQuestionType(scope.row.code.split('_')[0]) }}</span>
+                                <el-tag type="primary"
+                                    v-if="scope.row.code.split('_')[0] =='TEXTAREA'">
+                                    {{ getQuestionType(scope.row.code.split('_')[0]) }}</el-tag>
+                                <el-tag type="warning"
+                                    v-else-if="scope.row.code.split('_')[0] =='RADIO'">
+                                    {{ getQuestionType(scope.row.code.split('_')[0]) }}</el-tag>
+                                <el-tag type="success"
+                                    v-else-if="scope.row.code.split('_')[0] =='CHECKBOX'">
+                                    {{ getQuestionType(scope.row.code.split('_')[0]) }}</el-tag>
                             </template>
                         </el-table-column>
                         <el-table-column prop="" label="选项" align="left" show-overflow-tooltip>
@@ -66,7 +74,8 @@
                                 <span v-if="!scope.row.questionnaireOption.length">--</span>
                                 <template v-else>
                                     <div v-for="(item,index) in scope.row.questionnaireOption"
-                                        :key="index">{{  item.optionContent}}</div>
+                                        :key="index">{{  item.optionContent}}
+                                    </div>
                                 </template>
                             </template>
                         </el-table-column>
@@ -75,7 +84,8 @@
                                 <span v-if="!scope.row.questionnaireOption.length">--</span>
                                 <template v-else>
                                     <div v-for="(item,index) in scope.row.questionnaireOption"
-                                        :key="index">{{  item.questionnaireOptionSubCount}}</div>
+                                        :key="index">
+                                        {{  item.questionnaireOptionSubCount}}</div>
                                 </template>
                             </template>
                         </el-table-column>
@@ -84,7 +94,8 @@
                                 <span v-if="!scope.row.questionnaireOption.length">--</span>
                                 <template v-else>
                                     <div v-for="(item,index) in scope.row.questionnaireOption"
-                                        :key="index">{{  item.percentage}}</div>
+                                        :key="index">
+                                        {{  item.percentage}}</div>
                                 </template>
                             </template>
                         </el-table-column>
@@ -241,7 +252,11 @@ export default {
                 series: [
                     {
                         data: yData,
-                        type: 'bar'
+                        type: 'bar',
+                        barWidth: '30',
+                        itemStyle: {
+                            // 可以在此设置柱子的样式
+                        }
                     }
                 ]
             };

+ 158 - 98
src/views/permission/user/ResetPassword.vue

@@ -1,116 +1,176 @@
 <template>
-  <el-dialog :title="$t(`user.resetPassword`)" :close-on-click-modal="false"
-    :close-on-press-escape="false" :visible.sync="visible" lock-scroll
-    class="JNPF-dialog JNPF-dialog_center" width="600px">
-    <el-form ref="dataForm" v-loading="formLoading" :model="dataForm" :rules="dataRule"
-      label-width="100px">
-      <el-form-item label="账户" prop="account">
-        <el-input v-model="dataForm.account" placeholder="账户" readonly />
-      </el-form-item>
-      <el-form-item label="新密码" prop="userPassword">
-        <el-input v-model="dataForm.userPassword" type="password" autocomplete="off"
-          placeholder="输入新密码" />
-      </el-form-item>
-      <el-form-item label="确认新密码" prop="validatePassword">
-        <el-input v-model="dataForm.validatePassword" type="password" autocomplete="off"
-          placeholder="确认新密码" />
-      </el-form-item>
-    </el-form>
-    <span slot="footer" class="dialog-footer">
-      <el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button>
-      <el-button type="primary" :loading="btnLoading" @click="dataFormSubmit()">
-        {{$t('common.confirmButton')}}</el-button>
-    </span>
-  </el-dialog>
+    <el-dialog :title="$t(`user.resetPassword`)" :close-on-click-modal="false"
+        :close-on-press-escape="false" :visible.sync="visible" lock-scroll
+        class="JNPF-dialog JNPF-dialog_center" width="600px">
+        <el-form ref="dataForm" v-loading="formLoading" :model="dataForm" :rules="dataRule"
+            label-width="100px">
+            <el-form-item label="账户" prop="account">
+                <el-input v-model="dataForm.account" placeholder="账户" readonly />
+            </el-form-item>
+            <el-form-item label="新密码" prop="userPassword">
+                <el-input v-model="dataForm.userPassword" type="password" show-password
+                    autocomplete="off" placeholder="输入新密码" />
+            </el-form-item>
+            <el-form-item label="确认新密码" prop="validatePassword">
+                <el-input v-model="dataForm.validatePassword" type="password" show-password
+                    autocomplete="off" placeholder="确认新密码" />
+            </el-form-item>
+        </el-form>
+        <span slot="footer" class="dialog-footer">
+            <el-button @click="visible = false">{{$t('common.cancelButton')}}</el-button>
+            <el-button type="primary" :loading="btnLoading" @click="dataFormSubmit()">
+                {{$t('common.confirmButton')}}</el-button>
+        </span>
+    </el-dialog>
 </template>
 
 <script>
 import {
-  resetUserPassword
+    resetUserPassword
 } from '@/api/permission/user'
 import md5 from 'js-md5'
 import { getSystemConfig } from '@/api/system/sysConfig'
 
 export default {
-  data() {
-    const validateUserPassword = (rule, value, callback) => {
+    data() {
+        var validatePass = (rule, value, callback) => {
+            // const passwordreg = /(?=.*\d)(?=.*[a-zA-Z])(?=.*[^a-zA-Z0-9]).{6,16}/
+            //是否包含数字
+            const containsNumbers = /[0-9]+/
+            //是否包含小写字符
+            const includeLowercaseLetters = /[a-z]+/
+            //是否包含大写字符
+            const includeUppercaseLetters = /[A-Z]+/
+            //是否包含字符
+            const containsCharacters = /\W/
+            const containsCharacters2 = /_/
 
-      if (value === '') {
-        callback(new Error('新密码不能为空'));
-      }else{
-        if (this.dataForm.password2 !== '') {
-          this.$refs.dataForm.validateField('password2');
+            if (value === '') {
+                callback(new Error('新密码不能为空'));
+            } else if (this.baseForm.passwordStrengthLimit == 1) {
+                if (this.baseForm.passwordLengthMin) {
+                    if (value.length < this.baseForm.passwordLengthMinNumber) {
+                        callback(new Error('新密码长度不能小于' + this.baseForm.passwordLengthMinNumber + '位'));
+                    }
+                }
+                if (this.baseForm.containsNumbers) {
+                    if (!containsNumbers.test(value)) {
+                        callback(new Error('新密码必须包含数字'));
+                    }
+                }
+                if (this.baseForm.includeLowercaseLetters) {
+                    if (!includeLowercaseLetters.test(value)) {
+                        callback(new Error('新密码必须包含小写字母'));
+                    }
+                }
+                if (this.baseForm.includeUppercaseLetters) {
+                    if (!includeUppercaseLetters.test(value)) {
+                        callback(new Error('新密码必须包含大写字母'));
+                    }
+                }
+                if (this.baseForm.containsCharacters) {
+                    if (!containsCharacters.test(value) && !containsCharacters2.test(value)) {
+                        callback(new Error('新密码必须包含字符'));
+                    }
+                }
+                if (this.dataForm.validatePassword !== '') {
+                    this.$refs.dataForm.validateField('validatePassword');
+                }
+                callback();
+            } else {
+                if (this.dataForm.validatePassword !== '') {
+                    this.$refs.dataForm.validateField('validatePassword');
+                }
+                callback();
+            }
+        };
+        var validatePass2 = (rule, value, callback) => {
+            if (value !== this.dataForm.userPassword) {
+                callback(new Error('两次密码输入不一致'));
+            } else {
+                callback();
+            }
+        };
+        return {
+            visible: false,
+            formLoading: false,
+            btnLoading: false,
+            dataForm: {
+                id: '',
+                account: '',
+                userPassword: '',
+                validatePassword: ''
+            },
+            dataRule: {
+                userPassword: [
+                    { required: true, validator: validatePass, trigger: 'blur' }
+                ],
+                validatePassword: [
+                    { validator: validatePass2, trigger: 'blur' }
+                ]
+            },
+            baseForm: {
+                passwordStrengthLimit: 0,
+                passwordLengthMin: false,
+                passwordLengthMinNumber: 0,
+                containsNumbers: false,
+                includeLowercaseLetters: false,
+                includeUppercaseLetters: false,
+                containsCharacters: false,
+            },
         }
-        callback();
-      }
-    }
-    const validatePassword = (rule, value, callback) => {
-      if (value === '') {
-        callback(new Error('请再次输入新密码'));
-      } else if (value !== this.dataForm.userPassword) {
-        callback(new Error('两次输入密码不一致!'));
-      } else {
-        callback();
-      }
-    }
-    return {
-      visible: false,
-      formLoading: false,
-      btnLoading: false,
-      dataForm: {
-        id: '',
-        account: '',
-        userPassword: '',
-        validatePassword: ''
-      },
-      dataRule: {
-        userPassword: [
-          { required: true, validator: validateUserPassword, trigger: 'blur' }
-        ],
-        validatePassword: [
-          { required: true, validator: validatePassword, trigger: 'blur' }
-        ]
-      }
-    }
-  },
-  methods: {
-
-    init(id, account) {
-      this.visible = true
-      this.formLoading = true
-      this.$nextTick(() => {
-        this.$refs['dataForm'].resetFields()
-        this.dataForm.id = id
-        this.dataForm.account = account
-        this.formLoading = false
-      })
     },
-    dataFormSubmit() {
-      this.$refs['dataForm'].validate((valid) => {
-        if (valid) {
-          this.btnLoading = true
-          const formData = {
-            id: this.dataForm.id,
-            userPassword: md5(this.dataForm.userPassword),
-            validatePassword: md5(this.dataForm.validatePassword)
-          }
-          resetUserPassword(formData).then(res => {
-            this.$message({
-              message: res.msg,
-              type: 'success',
-              duration: 1500,
-              onClose: () => {
-                this.visible = false
-                this.btnLoading = false
-                this.$emit('refreshDataList')
-              }
+    methods: {
+
+        init(id, account) {
+            this.visible = true
+            this.formLoading = true
+            this.$nextTick(() => {
+                this.$refs['dataForm'].resetFields()
+                this.dataForm.id = id
+                this.dataForm.account = account
+
+                this.$nextTick(() => {
+                    getSystemConfig().then(res => {
+                        this.baseForm = res.data
+                        this.baseForm.passwordLengthMin = this.baseForm.passwordLengthMin ? true : false
+                        this.baseForm.containsNumbers = this.baseForm.containsNumbers ? true : false
+                        this.baseForm.includeLowercaseLetters = this.baseForm.includeLowercaseLetters ? true : false
+                        this.baseForm.includeUppercaseLetters = this.baseForm.includeUppercaseLetters ? true : false
+                        this.baseForm.containsCharacters = this.baseForm.containsCharacters ? true : false
+                        this.formLoading = false
+                    }).catch(() => {
+                        this.formLoading = false
+                    })
+                })
+            })
+        },
+        dataFormSubmit() {
+            this.$refs['dataForm'].validate((valid) => {
+                if (valid) {
+                    this.btnLoading = true
+                    const formData = {
+                        id: this.dataForm.id,
+                        userPassword: md5(this.dataForm.userPassword),
+                        validatePassword: md5(this.dataForm.validatePassword)
+                    }
+                    resetUserPassword(formData).then(res => {
+                        this.$message({
+                            message: res.msg,
+                            type: 'success',
+                            duration: 1500,
+                            onClose: () => {
+                                this.visible = false
+                                this.btnLoading = false
+                                this.$emit('refreshDataList')
+                            }
+                        })
+                    }).catch(() => {
+                        this.btnLoading = false
+                    })
+                }
             })
-          }).catch(() => {
-            this.btnLoading = false
-          })
         }
-      })
     }
-  }
 }
 </script>