|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<view class="content-area">
|
|
|
- <!-- <view class="content-area-title font12 mtb5 plr10">实时保存,保存时间 {{ saveTime }}</view> -->
|
|
|
+ <view class="content-area-title font12 mtb5 plr10" v-if="!state.form.id">{{state.form.id}}实时保存,保存时间 {{ saveTime }}</view>
|
|
|
|
|
|
<view class="content-area-item p10 bg-white">
|
|
|
<view class="font14 weight mb10 required">工作内容</view>
|
|
@@ -244,8 +244,10 @@ function insertProjects() {
|
|
|
|
|
|
/** 实时保存填写数据 */
|
|
|
function realTimeSaving() {
|
|
|
- state.saveTime = proxy.$time.formatterDate(new Date(), "hh:mm");
|
|
|
- storageSystem.set("project", state);
|
|
|
+ if(!state.form.id){
|
|
|
+ state.saveTime = proxy.$time.formatterDate(new Date(), "hh:mm");
|
|
|
+ storageSystem.set("project", state);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
/** 弹窗确定 */
|
|
@@ -272,7 +274,7 @@ function modalConfirm() {
|
|
|
});
|
|
|
|
|
|
modal.modalShow = false;
|
|
|
- realTimeSaving();
|
|
|
+ // realTimeSaving();
|
|
|
}
|
|
|
|
|
|
/** 提交 */
|
|
@@ -293,7 +295,7 @@ function handleSubmit() {
|
|
|
state.form.coordinateWork = null;
|
|
|
state.form.isRegularlySend = 0;
|
|
|
state.form.timingTime = null;
|
|
|
- storageSystem.set("project", state);
|
|
|
+ // storageSystem.set("project", state);
|
|
|
});
|
|
|
}
|
|
|
|
|
@@ -312,7 +314,7 @@ watch(
|
|
|
state.projectsCheck.push(e.projectId);
|
|
|
});
|
|
|
var ccTo = state.form.ccTo.length > 0 ? state.form.ccTo.split(",").map((num) => Number(num)) : [];
|
|
|
- setTimeout(function () {
|
|
|
+ // setTimeout(function () {
|
|
|
state.userDate.forEach((e) => {
|
|
|
if (ccTo.includes(e.userId)) {
|
|
|
state.userList.push({
|
|
@@ -331,15 +333,16 @@ watch(
|
|
|
});
|
|
|
}
|
|
|
});
|
|
|
- }, 300);
|
|
|
+ // }, 300);
|
|
|
|
|
|
projectApi()
|
|
|
.ProjectsSelect()
|
|
|
.then((requset) => {
|
|
|
state.projectsList = requset.data;
|
|
|
});
|
|
|
-
|
|
|
- storageSystem.set("project", state);
|
|
|
+ if(!state.form.id){
|
|
|
+ storageSystem.set("project", state);
|
|
|
+ }
|
|
|
}
|
|
|
);
|
|
|
|
|
@@ -347,15 +350,22 @@ onReady(() => {});
|
|
|
|
|
|
onShow(() => {
|
|
|
//循环将缓存数据遍历
|
|
|
- // var storages = storageSystem.get("project");
|
|
|
- // Object.keys(storages).forEach((key) => {
|
|
|
- // state[key] = storages[key];
|
|
|
- // });
|
|
|
+
|
|
|
+ if(!state.form.id){
|
|
|
+ var storages = storageSystem.get("project");
|
|
|
+ Object.keys(storages).forEach((key) => {
|
|
|
+ state[key] = storages[key];
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
// 监听组件返回数据
|
|
|
uni.$on("UserMall", function (value) {
|
|
|
state.userList = value;
|
|
|
- realTimeSaving();
|
|
|
+ if(!state.form.id){
|
|
|
+ realTimeSaving();
|
|
|
+ }
|
|
|
+
|
|
|
});
|
|
|
});
|
|
|
|