no message
This commit is contained in:
parent
32da0650d8
commit
fd47dfec2b
@ -56,8 +56,8 @@ Vue.prototype.download = download
|
|||||||
Vue.prototype.handleTree = handleTree
|
Vue.prototype.handleTree = handleTree
|
||||||
Vue.prototype.imgurl = 'http://192.168.0.138:8008'
|
Vue.prototype.imgurl = 'http://192.168.0.138:8008'
|
||||||
// Vue.prototype.pcUrl = 'http://192.168.0.178:83/'
|
// Vue.prototype.pcUrl = 'http://192.168.0.178:83/'
|
||||||
Vue.prototype.pcUrl = 'https://cashier.youkerr.com/'
|
Vue.prototype.pcUrl = 'http://localhost:83/#/' // 收银台
|
||||||
Vue.prototype.ztUrl = 'http://localhost:82/'
|
Vue.prototype.ztUrl = 'http://localhost:82/' // 中台
|
||||||
const Collapse= false
|
const Collapse= false
|
||||||
Vue.prototype.isCollapse = Collapse
|
Vue.prototype.isCollapse = Collapse
|
||||||
|
|
||||||
|
@ -55,6 +55,12 @@ const user = {
|
|||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
login(username, password, captchaCode, uuid).then(res => {
|
login(username, password, captchaCode, uuid).then(res => {
|
||||||
console.log("user_58",res.data)
|
console.log("user_58",res.data)
|
||||||
|
|
||||||
|
// dutyRoleCode
|
||||||
|
Cookies.remove('DUTY_ROLE_CODE');
|
||||||
|
|
||||||
|
Cookies.set("DUTY_ROLE_CODE", res.data.dutyRoleCode);
|
||||||
|
|
||||||
if (res.data.ownerId == "3") {
|
if (res.data.ownerId == "3") {
|
||||||
setToken(res.data.token)
|
setToken(res.data.token)
|
||||||
commit('SET_TOKEN', res.data.token)
|
commit('SET_TOKEN', res.data.token)
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="handleAdd1"
|
@click="handleAdd1"
|
||||||
|
v-hasPermi="['duty:index:add']"
|
||||||
>新增
|
>新增
|
||||||
</el-button>
|
</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -76,12 +76,14 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate1(scope.row)"
|
@click="handleUpdate1(scope.row)"
|
||||||
|
v-hasPermi="['duty:index:update']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete1(scope.row)"
|
@click="handleDelete1(scope.row)"
|
||||||
|
v-hasPermi="['duty:index:del']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -279,11 +279,19 @@ export default {
|
|||||||
Cookies.remove('rememberMe');
|
Cookies.remove('rememberMe');
|
||||||
}
|
}
|
||||||
app.$store.dispatch("Login", this.loginForm).then(() => {
|
app.$store.dispatch("Login", this.loginForm).then(() => {
|
||||||
|
// Cookies.set("DUTY_ROLE_CODE", res.data.dutyRoleCode);
|
||||||
|
|
||||||
|
if (Cookies.get("DUTY_ROLE_CODE") && Cookies.get("DUTY_ROLE_CODE") == 2) {
|
||||||
|
console.log("123")
|
||||||
|
location.replace(this.pcUrl+"homeindex");
|
||||||
|
}else {
|
||||||
if (Cookies.get("IS_ZT_LOGIN")) {
|
if (Cookies.get("IS_ZT_LOGIN")) {
|
||||||
location.replace(this.ztUrl+"resource_oilbank");
|
location.replace(this.ztUrl+"resource_oilbank");
|
||||||
}else {
|
}else {
|
||||||
app.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
app.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
app.loading = false;
|
app.loading = false;
|
||||||
|
@ -52,6 +52,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['staff:list:save']"
|
||||||
>新增员工</el-button>
|
>新增员工</el-button>
|
||||||
</el-col>
|
</el-col>
|
||||||
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
||||||
@ -109,6 +110,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(scope.row)"
|
@click="handleUpdate(scope.row)"
|
||||||
|
v-hasPermi="['staff:list:update']"
|
||||||
>修改</el-button>
|
>修改</el-button>
|
||||||
<el-button
|
<el-button
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -132,6 +134,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['staff:list:del']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
|
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-button type="primary" @click="submitStore">保存信息</el-button>
|
<el-button type="primary" @click="submitStore" v-hasPermi="['staff:storeInfo:index:save']">保存信息</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="6">
|
<el-col :span="6">
|
||||||
|
@ -76,6 +76,7 @@
|
|||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-delete"
|
icon="el-icon-delete"
|
||||||
@click="handleDelete(scope.row)"
|
@click="handleDelete(scope.row)"
|
||||||
|
v-hasPermi="['staff:tag:list:del']"
|
||||||
>删除</el-button>
|
>删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
@ -132,6 +132,7 @@
|
|||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="handleAdd"
|
@click="handleAdd"
|
||||||
|
v-hasPermi="['staffCommission:staffCommission\n']"
|
||||||
>新增提成方案</el-button>
|
>新增提成方案</el-button>
|
||||||
<el-table ref="tables" v-loading="loading" :data="list"
|
<el-table ref="tables" v-loading="loading" :data="list"
|
||||||
@selection-change="handleSelectionChange" :default-sort="defaultSort"
|
@selection-change="handleSelectionChange" :default-sort="defaultSort"
|
||||||
|
@ -150,6 +150,9 @@ public class BackendLoginController extends BaseController {
|
|||||||
if (!myPassword.equals(inputPassword) || !tAccount.getAccountStatus().toString().equals("1")) {
|
if (!myPassword.equals(inputPassword) || !tAccount.getAccountStatus().toString().equals("1")) {
|
||||||
return getFailureResult(201, "账号或密码有误");
|
return getFailureResult(201, "账号或密码有误");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Subject subject = SecurityUtils.getSubject();
|
Subject subject = SecurityUtils.getSubject();
|
||||||
UsernamePasswordToken info = new UsernamePasswordToken(accountInfo.getAccountName(), tAccount.getPassword());
|
UsernamePasswordToken info = new UsernamePasswordToken(accountInfo.getAccountName(), tAccount.getPassword());
|
||||||
subject.login(info);
|
subject.login(info);
|
||||||
@ -214,6 +217,10 @@ public class BackendLoginController extends BaseController {
|
|||||||
if (!myPassword.equals(inputPassword) || !tAccount.getAccountStatus().toString().equals("1")) {
|
if (!myPassword.equals(inputPassword) || !tAccount.getAccountStatus().toString().equals("1")) {
|
||||||
return getFailureResult(201, "账号或密码有误");
|
return getFailureResult(201, "账号或密码有误");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TDuty roleById = dutyService.getRoleById(Long.parseLong(accountInfo.getRoleIds()));
|
||||||
|
|
||||||
|
|
||||||
Subject subject = SecurityUtils.getSubject();
|
Subject subject = SecurityUtils.getSubject();
|
||||||
UsernamePasswordToken info = new UsernamePasswordToken(accountInfo.getAccountName(), tAccount.getPassword());
|
UsernamePasswordToken info = new UsernamePasswordToken(accountInfo.getAccountName(), tAccount.getPassword());
|
||||||
subject.login(info);
|
subject.login(info);
|
||||||
@ -226,6 +233,7 @@ public class BackendLoginController extends BaseController {
|
|||||||
if (ObjectUtil.isEmpty(one.getOwnerId())) {
|
if (ObjectUtil.isEmpty(one.getOwnerId())) {
|
||||||
one.setOwnerId(-1); //设置为普通员工并进行跳转
|
one.setOwnerId(-1); //设置为普通员工并进行跳转
|
||||||
}
|
}
|
||||||
|
response.setDutyRoleCode(roleById.getRoleCode());
|
||||||
response.setOwnerId(one.getOwnerId().toString());
|
response.setOwnerId(one.getOwnerId().toString());
|
||||||
response.setTokenCreatedTime(new Date());
|
response.setTokenCreatedTime(new Date());
|
||||||
return getSuccessResult(response);
|
return getSuccessResult(response);
|
||||||
|
@ -21,4 +21,5 @@ public class LoginResponse implements Serializable {
|
|||||||
private Integer accountId;
|
private Integer accountId;
|
||||||
private String phone;
|
private String phone;
|
||||||
private String ownerId;
|
private String ownerId;
|
||||||
|
private String dutyRoleCode;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user