|
@@ -157,7 +157,7 @@ import {
|
|
|
getRoles,
|
|
|
} from "@/api/rsmonitoring/dkjbxx";
|
|
|
import numCard from "@/components/numCard";
|
|
|
-import useDataStore from '@/store/modules/data'
|
|
|
+import useDataStore from "@/store/modules/data";
|
|
|
import { FormConfig, TableHeader, countparm, sdlist } from "./config";
|
|
|
const { proxy } = getCurrentInstance();
|
|
|
const { num_compare } = proxy.useDict("num_compare");
|
|
@@ -289,7 +289,7 @@ function fieldwork(field) {
|
|
|
title.value = field ? "分发至外业" : "取消分发外业任务";
|
|
|
if (field) {
|
|
|
form.value.fieldworkId = "";
|
|
|
- form.value.fieldworkBy = "zhang";
|
|
|
+ form.value.fieldworkBy = "";
|
|
|
}
|
|
|
form.value.auditflowStep = field ? "WYFF" : "WYQR";
|
|
|
getRoles().then((response) => {
|
|
@@ -306,14 +306,20 @@ function submitForm() {
|
|
|
proxy.$refs["dkjbxxRef"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (isfield.value) {
|
|
|
- field(form.value).then((response) => {
|
|
|
- proxy.$modal.msgSuccess("分发成功");
|
|
|
- open.value = false;
|
|
|
- getList();
|
|
|
- });
|
|
|
+ if (form.value.fieldworkId) {
|
|
|
+ let user = roles.value.find(
|
|
|
+ (r) => r.userId == form.value.fieldworkId
|
|
|
+ );
|
|
|
+ form.value.fieldworkBy = user.nickName;
|
|
|
+ field(form.value).then((response) => {
|
|
|
+ proxy.$modal.msgSuccess("分发成功");
|
|
|
+ open.value = false;
|
|
|
+ getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
} else {
|
|
|
removeField(form.value).then((response) => {
|
|
|
- proxy.$modal.msgSuccess("新增成功");
|
|
|
+ proxy.$modal.msgSuccess("取消分发成功");
|
|
|
open.value = false;
|
|
|
getList();
|
|
|
});
|