no message

This commit is contained in:
kuaifan 2021-06-07 21:40:58 +08:00
parent fd1ce8b257
commit f4f03c57ef
5 changed files with 41 additions and 21 deletions

View File

@ -156,9 +156,9 @@
<Input
ref="addColumnName"
v-model="addColumnName"
@on-blur="addColumnShow=false"
@on-clear="addColumnShow=false"
@on-blur="addColumnBlur"
@on-enter="addColumnSubmit"
@on-clear="addColumnShow=false"
:placeholder="$L('列表名称,回车创建')"
clearable/>
</div>
@ -695,6 +695,12 @@ export default {
})
},
addColumnBlur() {
if (this.addColumnName === '') {
this.addColumnShow = false
}
},
addColumnSubmit() {
let name = this.addColumnName.trim();
if (name === '') {
@ -712,6 +718,7 @@ export default {
success: ({ret, data, msg}) => {
if (ret === 1) {
$A.messageSuccess(msg);
this.addColumnName = '';
this.projectDetail.project_column.push(data)
} else {
$A.modalError(msg, 301);

View File

@ -17,7 +17,7 @@
<div class="priority">
<ul>
<li v-for="(item, key) in taskPriority" :key="key">
<Tooltip :content="item.name + ' (' + item.days + $L('天') + ')'" transfer>
<Tooltip v-if="active" :content="item.name + ' (' + item.days + $L('天') + ')'" transfer>
<i
class="iconfont"
:style="{color:item.color}"

View File

@ -139,6 +139,7 @@ export default {
if (state.projectDetail.id === project_id) {
state.projectDetail = data;
}
state.method.setStorage("cacheProject", state.cacheProject);
} else {
$A.modalError(msg);
}
@ -172,20 +173,20 @@ export default {
return;
}
//
if (state.cacheUserBasic["::loading"] === true) {
if (state.cacheUserBasic["::load"] === true) {
setTimeout(() => {
this.commit('getUserBasic', params);
}, 20);
return;
}
state.cacheUserBasic["::loading"] = true;
state.cacheUserBasic["::load"] = true;
$A.apiAjax({
url: 'users/basic',
data: {
userid: array
},
complete: () => {
state.cacheUserBasic["::loading"] = false;
state.cacheUserBasic["::load"] = false;
typeof complete === "function" && complete()
},
success: ({ret, data, msg}) => {
@ -195,6 +196,7 @@ export default {
time,
data: item
};
state.method.setStorage("cacheUserBasic", state.cacheUserBasic);
this.commit('setUserOnlineStatus', item);
typeof success === "function" && success(item, true)
});
@ -329,6 +331,7 @@ export default {
dialog: data.dialog,
data: data.data.reverse(),
};
state.method.setStorage("cacheDialog", state.cacheDialog);
if (state.dialogId === dialog_id) {
state.dialogDetail = state.cacheDialog[dialog_id].dialog;
state.cacheDialog[dialog_id].data.forEach((item) => {

View File

@ -49,41 +49,43 @@ const method = {
},
storage(key, value) {
let keyName = 'state';
if (!key) {
return;
}
let keyName = '__state__';
if (key.substring(0, 5) === 'cache') {
keyName = '__state:Cache__';
}
if (typeof value === 'undefined') {
return this.loadFromlLocal('__::', key, '', '__' + keyName + '__');
return this.loadFromlLocal(key, '', keyName);
} else {
this.savaToLocal('__::', key, value, '__' + keyName + '__');
this.savaToLocal(key, value, keyName);
}
},
savaToLocal(id, key, value, keyName) {
savaToLocal(key, value, keyName) {
try {
if (typeof keyName === 'undefined') keyName = '__seller__';
let seller = window.localStorage[keyName];
if (!seller) {
seller = {};
seller[id] = {};
} else {
seller = JSON.parse(seller);
if (!seller[id]) {
seller[id] = {};
}
}
seller[id][key] = value;
seller[key] = value;
window.localStorage[keyName] = JSON.stringify(seller);
} catch (e) {
}
},
loadFromlLocal(id, key, def, keyName) {
loadFromlLocal(key, def, keyName) {
try {
if (typeof keyName === 'undefined') keyName = '__seller__';
let seller = window.localStorage[keyName];
if (!seller) {
return def;
}
seller = JSON.parse(seller)[id];
seller = JSON.parse(seller);
if (!seller || typeof seller[key] === 'undefined') {
return def;
}
@ -195,8 +197,8 @@ state.dialogMsgUnread = 0;
state.taskPriority = [];
// 其他
state.cacheProject = {};
state.cacheUserBasic = {};
state.cacheDialog = {};
state.cacheProject = state.method.getStorageJson("cacheProject");
state.cacheUserBasic = state.method.getStorageJson("cacheUserBasic");
state.cacheDialog = state.method.getStorageJson("cacheDialog");
export default state

View File

@ -185,6 +185,12 @@
height: 36px;
.ivu-input {
height: 36px;
padding: 4px 10px;
}
.ivu-input-icon {
width: 36px;
height: 36px;
line-height: 36px;
}
}
&.show-input {
@ -239,7 +245,7 @@
}
.ivu-poptip-popper {
color: #515a6e;
min-width: 150px;
min-width: 130px;
.ivu-poptip-body {
padding: 0;
}
@ -383,6 +389,8 @@
> li {
list-style: none;
margin-left: -6px;
width: 32px;
height: 32px;
&:first-child {
margin-left: 0;
}