md
This commit is contained in:
parent
f387b9cde6
commit
03519c4aab
@ -116,6 +116,15 @@ export function updateUserProfile(data) {
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 检查是否初始密码
|
||||
export function checkIsInitPassword() {
|
||||
return request({
|
||||
url: '/system/user/profile/checkIsInitPassword',
|
||||
method: 'put'
|
||||
})
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export function updateUserPwd(oldPassword, newPassword) {
|
||||
const data = {
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<!-- 搜索 -->
|
||||
<!-- <search id="header-search"/> -->
|
||||
<!-- <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav"/> -->
|
||||
<!-- <div class="free-user-login-notice"><i class="el-icon-warning-outline" /> 您当前是免费测试账号,接口频次为10QPS(大约5~10人同时访问),服务器和带宽资源有限,建议您升级为付费会员尊享极速体验。</div> -->
|
||||
<div class="user-restpwd-notice" v-if="needRstPwd"><i class="el-icon-warning-outline" /> 您当前密码不安全,请立即<span style="color:blue" @click="goToRstPwd">【修改密码】</span>!</div>
|
||||
<!-- <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav"/> -->
|
||||
<!-- <top-nav id="topmenu-container" class="topmenu-container" /> -->
|
||||
<div style="line-height: 46px;cursor: pointer;height: 100%;float: left; position: relative;">
|
||||
@ -91,6 +91,10 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
<el-dialog title="当前密码不安全,请立即修改密码" :visible.sync="openRstPwd" width="40%" v-dialogDrag append-to-body>
|
||||
<resetPwd :user="user" @on-success="onRstPwdSuccess" @on-close="onRstPwdClose" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -106,6 +110,8 @@ import TopTagsView from '../components/TopTagsView'
|
||||
import TopNotice from '../components/TopNotice'
|
||||
import Cookies from 'js-cookie'
|
||||
import { getI18nMessages } from "@/api/common"
|
||||
import { checkIsInitPassword,getUserProfile } from "@/api/system/user"
|
||||
import resetPwd from "@/views/system/user/profile/resetPwd";
|
||||
|
||||
var qimoClientId = null;
|
||||
|
||||
@ -118,11 +124,16 @@ export default {
|
||||
SizeSelect,
|
||||
Search,
|
||||
TopTagsView,
|
||||
TopNotice
|
||||
TopNotice,
|
||||
resetPwd
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
openKfView:false
|
||||
openKfView:false,
|
||||
timer: undefined,
|
||||
needRstPwd:false,
|
||||
openRstPwd:false,
|
||||
user:{},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
@ -166,8 +177,15 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.initKFClient();
|
||||
this.checkIsNeedRstPwd();
|
||||
},
|
||||
methods: {
|
||||
goToRstPwd(){
|
||||
getUserProfile().then(response => {
|
||||
this.user = response.data;
|
||||
this.openRstPwd=true;
|
||||
});
|
||||
},
|
||||
// 初始化客服
|
||||
initKFClient(){
|
||||
qimoClientId = {userId: this.empCode, nickName:this.empName,agent:'8001',customField: {}, priority: false}
|
||||
@ -177,6 +195,27 @@ export default {
|
||||
toggleSideBar() {
|
||||
this.$store.dispatch('app/toggleSideBar')
|
||||
},
|
||||
// 检查弱密码
|
||||
checkIsNeedRstPwd(){
|
||||
checkIsInitPassword().then(res=>{
|
||||
if(res.code==200){
|
||||
if(res.data=="0"){
|
||||
this.needRstPwd=false;
|
||||
}else{
|
||||
this.needRstPwd=true;
|
||||
this.openRstPwd=true;
|
||||
}
|
||||
}
|
||||
}).catch(error => {
|
||||
});
|
||||
},
|
||||
onRstPwdSuccess(){
|
||||
this.needRstPwd=false;
|
||||
this.openRstPwd=false;
|
||||
},
|
||||
onRstPwdClose(){
|
||||
this.openRstPwd=false;
|
||||
},
|
||||
async logout() {
|
||||
this.$confirm('确定注销并退出系统吗?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
@ -345,5 +384,37 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.user-restpwd-notice {
|
||||
line-height: 50px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: red;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
background: white;
|
||||
z-index: 9999;
|
||||
width: 100%;
|
||||
padding-left: 20px;
|
||||
margin-left: 14px;
|
||||
}
|
||||
|
||||
:deep .el-dialog{
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
margin:0 !important;
|
||||
position:absolute;
|
||||
top:50%;
|
||||
left:50%;
|
||||
transform:translate(-50%,-50%);
|
||||
max-height:calc(100% - 30px);
|
||||
max-width:calc(100% - 30px);
|
||||
}
|
||||
:deep .el-dialog .el-dialog__body{
|
||||
flex:1;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
}
|
||||
</style>
|
||||
|
||||
@ -15,8 +15,6 @@
|
||||
<el-col :span="12">
|
||||
<el-form-item label="产品类型" prop="prodCode">
|
||||
<TransProductCasPicker placeholder="产品类型" v-model="form.prodCodeSelArr" @onChange="onProductChange" ></TransProductCasPicker>
|
||||
|
||||
<TransProductPicker placeholder="产品类型" v-model="form.prodCode" :transLineCode="form.lineCode" @onChange="onProdChange"></TransProductPicker>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
@ -50,7 +48,9 @@
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-dd HH:mm:ss"
|
||||
default-time = "00:00:00"
|
||||
placeholder="生效时间">
|
||||
placeholder="生效时间"
|
||||
@change="onStartDateChange"
|
||||
>
|
||||
</el-date-picker>
|
||||
</div>
|
||||
</el-form-item>
|
||||
@ -88,10 +88,10 @@
|
||||
|
||||
<script>
|
||||
import { listEmisSpecialCalcWeight, getEmisSpecialCalcWeight, delEmisSpecialCalcWeight, addEmisSpecialCalcWeight, updateEmisSpecialCalcWeight } from "@/api/emis/emisSpecialCalcWeight";
|
||||
import TransProductPicker from '@/views/emis/EmisBaseTools/TransProductPicker.vue';
|
||||
import CountryPicker from '@/views/emis/EmisBaseTools/CountryPicker.vue';
|
||||
import TransLinePicker from '@/views/emis/EmisBaseTools/TransLinePicker.vue';
|
||||
import TransProductCasPicker from '@/views/emis/EmisBaseTools/TransProductCasPicker.vue';
|
||||
import {addDateTimeByDay,dateToStr} from '@/utils/custom'
|
||||
|
||||
export default {
|
||||
name: "emisSpecialCalcWeightForm",
|
||||
@ -163,6 +163,9 @@ export default {
|
||||
this.reset();
|
||||
}
|
||||
},
|
||||
onStartDateChange(){
|
||||
this.form.endDate=dateToStr(addDateTimeByDay(this.form.beginDate,365));
|
||||
},
|
||||
onProdChange(item){
|
||||
console.log(item)
|
||||
this.form.prodName=item.prodName;
|
||||
|
||||
@ -400,7 +400,7 @@
|
||||
<el-table-column :label="$t('打印人')" align="center" prop="printManName" min-width="80" :show-overflow-tooltip="true"/>
|
||||
<el-table-column :label="$t('打印站点')" align="center" prop="printSiteName" min-width="80" :show-overflow-tooltip="true"/>
|
||||
<!-- </el-table-column> -->
|
||||
<el-table-column :label="$t('录单备注')" align="center" prop="remark" min-width="80" :show-overflow-tooltip="true" />
|
||||
<el-table-column :label="$t('运单备注')" align="center" prop="remark" min-width="80" :show-overflow-tooltip="true" />
|
||||
|
||||
<el-table-column :label="$t('数据来源')" align="center" prop="dataFrom" min-width="80" />
|
||||
|
||||
|
||||
@ -10,8 +10,8 @@
|
||||
<el-input v-model="user.confirmPassword" placeholder="请确认密码" type="password" show-password/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" size="mini" @click="submit">保存</el-button>
|
||||
<el-button type="danger" size="mini" @click="close">关闭</el-button>
|
||||
<el-button type="primary" size="small" @click="submit">保存</el-button>
|
||||
<el-button type="danger" size="small" @click="close">关闭</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</template>
|
||||
@ -41,7 +41,9 @@ export default {
|
||||
],
|
||||
newPassword: [
|
||||
{ required: true, message: "新密码不能为空", trigger: "blur" },
|
||||
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" }
|
||||
{ min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur" },
|
||||
{ pattern: /^(?![0-9]+$)(?![a-zA-Z]+$)[0-9A-Za-z]{6,20}$/, message: '密码需要6到20位之间字母数字组合', trigger: ['blur', 'change'] },
|
||||
|
||||
],
|
||||
confirmPassword: [
|
||||
{ required: true, message: "确认密码不能为空", trigger: "blur" },
|
||||
@ -56,15 +58,18 @@ export default {
|
||||
if (valid) {
|
||||
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.$emit("on-success");
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
close() {
|
||||
this.$emit("on-close");
|
||||
// this.$tab.closePage();
|
||||
this.$store.dispatch("tagView/delView",this.$router)
|
||||
let indexUrl=this.$store.state.permission.indexPage;
|
||||
this.$router.push({path:indexUrl});
|
||||
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Loading…
Reference in New Issue
Block a user