shouyedaibanyangshitioazheng

This commit is contained in:
shijing 2023-02-06 12:22:39 +08:00
parent 61f533ef9b
commit 723e2db9c5
3 changed files with 21 additions and 4 deletions

View File

@ -15,7 +15,7 @@ let requests = [];
// HTTP request 拦截器
axios.interceptors.request.use(
(config) => {
let token = tool.cookie.get("TOKEN");
let token = tool.cookie.get("TOKEN")?tool.cookie.get("TOKEN"):tool.data.get("TOKEN");
if(token){
config.headers[sysConfig.TOKEN_NAME] = sysConfig.TOKEN_PREFIX + token
}

View File

@ -8,11 +8,11 @@
</div>
</template>
<div class="card-body">
<div v-for="item in dutyAgg" :key="item.workflow">
<el-badge :value="item.count" class="item">
<div v-for="item in dutyAgg" :key="item.workflow" style=" margin-bottom: 10px;">
<el-badge :value="item.count" class="item workItemImg">
<el-button icon="el-icon-promotion" type="primary" size="small" @click="toTicket"></el-button>
</el-badge>
<div style="font-size:12px">{{ item.workflow__name }}</div>
<div class="workItemText">{{ item.workflow__name }}</div>
</div>
</div>
</el-card>
@ -243,5 +243,20 @@ export default {
flex-wrap: wrap;
justify-content: space-around;
height: 340px;
overflow-y: scroll;
padding-top: 10px;
}
.workItemImg{
left: 50%;
transform: translateX(-50%);
}
.workItemText{
width: 70px;
font-size: 12px;
word-wrap: break-word;
word-break: break-all;
text-align: center;
}
</style>

View File

@ -157,6 +157,8 @@ export default {
that.$TOOL.cookie.set("TOKEN", res.access, {
expires: that.form.autologin ? 24 * 60 * 60 : 0,
});
that.$TOOL.data.set("TOKEN", res.access);
that.$TOOL.data.set("TOKEN_REFRESH", res.refresh);
that.$TOOL.cookie.set("TOKEN_REFRESH", res.refresh);
that.$TOOL.data.set("TOKEN_TIME", new Date().getTime());
try {