|
@@ -170,7 +170,7 @@
|
|
|
<script setup>
|
|
|
/*----------------------------------依赖引入-----------------------------------*/
|
|
|
import { onLoad, onShow, onReady, onHide, onLaunch, onUnload, onNavigationBarButtonTap, onPageScroll } from "@dcloudio/uni-app";
|
|
|
-import { ref, reactive, computed, getCurrentInstance, toRefs, inject, watchEffect } from "vue";
|
|
|
+import { ref, reactive, computed, getCurrentInstance, toRefs, inject, watchEffect, watch } from "vue";
|
|
|
/*----------------------------------接口引入-----------------------------------*/
|
|
|
import { projectApi } from "@/api/business/project.js";
|
|
|
import { UserList } from "@/api/system/user.js";
|
|
@@ -293,16 +293,12 @@ function modalConfirm() {
|
|
|
});
|
|
|
});
|
|
|
|
|
|
- state.modalShow = false;
|
|
|
+ modal.modalShow = false;
|
|
|
realTimeSaving();
|
|
|
}
|
|
|
|
|
|
/** 提交 */
|
|
|
function handleSubmit() {
|
|
|
- if (!state.form.tomorrowPlan) {
|
|
|
- proxy.$modal.showToast("请输入明日计划");
|
|
|
- }
|
|
|
-
|
|
|
state.form.ccTo = state.userList.map((obj) => `${obj.id}`).join(",");
|
|
|
state.form.reportDate = proxy.$time.formatterDate(new Date(), "yyyy-MM-dd");
|
|
|
state.form.workContents.forEach((e) => {
|
|
@@ -322,18 +318,25 @@ function handleSubmit() {
|
|
|
});
|
|
|
}
|
|
|
|
|
|
-watchEffect(() => {
|
|
|
- if (JSON.stringify(props.projectList) != "{}") {
|
|
|
+watch(
|
|
|
+ () => props.projectList,
|
|
|
+ (val) => {
|
|
|
state.userList = [];
|
|
|
state.projectsCheck = [];
|
|
|
+ state.projectsList = [];
|
|
|
|
|
|
Object.keys(props.projectList).forEach((key) => {
|
|
|
state.form[key] = props.projectList[key];
|
|
|
});
|
|
|
|
|
|
- state.form.workContents.forEach((e) => {
|
|
|
- state.projectsCheck.push(e.projectId);
|
|
|
- });
|
|
|
+ projectApi()
|
|
|
+ .ProjectsSelect()
|
|
|
+ .then((requset) => {
|
|
|
+ state.projectsList = requset.data;
|
|
|
+ state.form.workContents.forEach((e) => {
|
|
|
+ state.projectsCheck.push(e.projectId);
|
|
|
+ });
|
|
|
+ });
|
|
|
|
|
|
var ccTo = state.form.ccTo.length > 0 ? state.form.ccTo.split(",").map((num) => Number(num)) : [];
|
|
|
state.userDate.forEach((e) => {
|
|
@@ -357,7 +360,7 @@ watchEffect(() => {
|
|
|
|
|
|
storageSystem.set("project", state);
|
|
|
}
|
|
|
-});
|
|
|
+);
|
|
|
|
|
|
onReady(() => {});
|
|
|
|