fix(测试跟踪): 缺陷管理弹窗记住上次同步时间
This commit is contained in:
parent
fe71d183a0
commit
642cac101c
|
@ -25,6 +25,7 @@
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.createTime"
|
v-model="form.createTime"
|
||||||
type="datetime"
|
type="datetime"
|
||||||
|
@change="changeSyncTime"
|
||||||
placeholder="选择日期时间">
|
placeholder="选择日期时间">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -65,6 +66,10 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
open() {
|
open() {
|
||||||
this.visible = true;
|
this.visible = true;
|
||||||
|
let syncTime = localStorage.getItem("ISSUE_SYNC_TIME");
|
||||||
|
if (syncTime) {
|
||||||
|
this.form.createTime = syncTime;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
save() {
|
save() {
|
||||||
this.$refs['form'].validate((valid) => {
|
this.$refs['form'].validate((valid) => {
|
||||||
|
@ -78,7 +83,11 @@ export default {
|
||||||
},
|
},
|
||||||
cancel() {
|
cancel() {
|
||||||
this.visible = false;
|
this.visible = false;
|
||||||
this.$refs.form.resetFields();
|
},
|
||||||
|
changeSyncTime() {
|
||||||
|
if (this.form.createTime) {
|
||||||
|
localStorage.setItem("ISSUE_SYNC_TIME", this.form.createTime);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in New Issue