|
@@ -4,28 +4,32 @@
|
|
|
|
|
|
|
|
<div class="work-detail-content">
|
|
<div class="work-detail-content">
|
|
|
<!-- 顶部状态 -->
|
|
<!-- 顶部状态 -->
|
|
|
- <div class="content-status">
|
|
|
|
|
|
|
+ <div class="content-status" :class="'status-' + detail?.flowStatus">
|
|
|
<div class="status-l">
|
|
<div class="status-l">
|
|
|
<div class="status-title">{{ statusText }}</div>
|
|
<div class="status-title">{{ statusText }}</div>
|
|
|
- <div class="status-sub" v-if="triggerDateText">
|
|
|
|
|
|
|
+ <div class="status-sub" v-if="triggerDateText && detail?.flowStatus === 0">
|
|
|
预计触发时间 {{ triggerDateText }}
|
|
预计触发时间 {{ triggerDateText }}
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="status-sub" v-if="detail?.flowStatus === 1">
|
|
|
|
|
+ 任务进度:1/2
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="work-wrap">
|
|
<div class="work-wrap">
|
|
|
<!-- 农事组信息 -->
|
|
<!-- 农事组信息 -->
|
|
|
- <div class="box-wrap group-info group-box">
|
|
|
|
|
|
|
+ <!-- <div class="box-wrap group-info group-box">
|
|
|
<div class="group-name">
|
|
<div class="group-name">
|
|
|
农事组:
|
|
农事组:
|
|
|
<span class="group-name-text">{{ detail.farmWorkName || detail.farmWorkLibName || "--" }}</span>
|
|
<span class="group-name-text">{{ detail.farmWorkName || detail.farmWorkLibName || "--" }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
- </div>
|
|
|
|
|
|
|
+ </div> -->
|
|
|
|
|
|
|
|
<!-- 每一段农事 -->
|
|
<!-- 每一段农事 -->
|
|
|
- <div v-for="(prescription, index) in stageList" :key="index" class="box-wrap stage-card">
|
|
|
|
|
|
|
+ <div v-for="(prescription, index) in stageList" :key="index" class="box-wrap stage-card" :class="'status-' + prescription.tagType">
|
|
|
<div class="stage-header">
|
|
<div class="stage-header">
|
|
|
<div class="stage-title">{{ getStageTitle(index, prescription) }}</div>
|
|
<div class="stage-title">{{ getStageTitle(index, prescription) }}</div>
|
|
|
|
|
+ <div class="title-tag" :class="'tag-' + prescription.tagType">{{ prescription.tagType === 0 ? "待完成" : "已完成" }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="stage-info">
|
|
<div class="stage-info">
|
|
@@ -110,10 +114,15 @@
|
|
|
</span>
|
|
</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <!-- 执行操作 -->
|
|
|
|
|
+ <div class="execute-action" v-if="info?.appType === 1 && prescription.tagType === 0">
|
|
|
|
|
+ <div class="action-item second">稍后执行</div>
|
|
|
|
|
+ <div class="action-item primary">我已完成</div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 底部按钮 -->
|
|
<!-- 底部按钮 -->
|
|
|
- <div class="fixed-btn-wrap">
|
|
|
|
|
|
|
+ <div class="fixed-btn-wrap" v-if="info?.appType === 2">
|
|
|
<div class="fixed-btn" @click="handleConvert">
|
|
<div class="fixed-btn" @click="handleConvert">
|
|
|
转发农事
|
|
转发农事
|
|
|
</div>
|
|
</div>
|
|
@@ -131,7 +140,8 @@ import { formatDate } from "@/common/commonFun";
|
|
|
|
|
|
|
|
const route = useRoute();
|
|
const route = useRoute();
|
|
|
const router = useRouter();
|
|
const router = useRouter();
|
|
|
-
|
|
|
|
|
|
|
+const info = JSON.parse(localStorage.getItem("localUserInfo") || "{}");
|
|
|
|
|
+console.log('info', info);
|
|
|
const detail = ref({
|
|
const detail = ref({
|
|
|
"consequenceText": "",
|
|
"consequenceText": "",
|
|
|
"id": null,
|
|
"id": null,
|
|
@@ -144,7 +154,7 @@ const detail = ref({
|
|
|
"expert": null,
|
|
"expert": null,
|
|
|
"orderStatus": null,
|
|
"orderStatus": null,
|
|
|
"activeStatus": null,
|
|
"activeStatus": null,
|
|
|
- "flowStatus": null,
|
|
|
|
|
|
|
+ "flowStatus": 1,
|
|
|
"farmId": null,
|
|
"farmId": null,
|
|
|
"regionId": null,
|
|
"regionId": null,
|
|
|
"farmMiniUserId": null,
|
|
"farmMiniUserId": null,
|
|
@@ -215,6 +225,7 @@ const detail = ref({
|
|
|
"groupList": [
|
|
"groupList": [
|
|
|
{
|
|
{
|
|
|
"name": "蒂蛀虫防治",
|
|
"name": "蒂蛀虫防治",
|
|
|
|
|
+ "tagType": 1,
|
|
|
"pesticideList": [
|
|
"pesticideList": [
|
|
|
{
|
|
{
|
|
|
"code": "1009",
|
|
"code": "1009",
|
|
@@ -295,6 +306,7 @@ const detail = ref({
|
|
|
},
|
|
},
|
|
|
{
|
|
{
|
|
|
"name": "蒂蛀虫防治",
|
|
"name": "蒂蛀虫防治",
|
|
|
|
|
+ "tagType": 0,
|
|
|
"pesticideList": [
|
|
"pesticideList": [
|
|
|
{
|
|
{
|
|
|
"code": "1009",
|
|
"code": "1009",
|
|
@@ -396,8 +408,8 @@ const stageExecutionMethods = ref({});
|
|
|
|
|
|
|
|
const statusText = computed(() => {
|
|
const statusText = computed(() => {
|
|
|
// 简单根据 flowStatus 判断,默认“待触发”
|
|
// 简单根据 flowStatus 判断,默认“待触发”
|
|
|
- if (detail.value.flowStatus === 2) return "执行中";
|
|
|
|
|
- if (detail.value.flowStatus === 3) return "已完成";
|
|
|
|
|
|
|
+ if (detail.value.flowStatus === 1) return "待完成";
|
|
|
|
|
+ if (detail.value.flowStatus === 2) return "已完成";
|
|
|
return "待触发";
|
|
return "待触发";
|
|
|
});
|
|
});
|
|
|
|
|
|
|
@@ -456,7 +468,6 @@ const getPesticideParam = (item, stageIndex) => {
|
|
|
|
|
|
|
|
const getParamRemark = (item, stageIndex) => {
|
|
const getParamRemark = (item, stageIndex) => {
|
|
|
const param = getPesticideParam(item, stageIndex);
|
|
const param = getPesticideParam(item, stageIndex);
|
|
|
- console.log('param', param?.remark);
|
|
|
|
|
return param?.remark || item.remark || "";
|
|
return param?.remark || item.remark || "";
|
|
|
};
|
|
};
|
|
|
|
|
|
|
@@ -500,6 +511,11 @@ const changeExecutionMethod = (stageIndex, value) => {
|
|
|
// background: #FF953D;
|
|
// background: #FF953D;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
}
|
|
}
|
|
|
|
|
+ &.status-1 {
|
|
|
|
|
+ &::after {
|
|
|
|
|
+ background: #FF953D;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
.status-l {
|
|
.status-l {
|
|
|
.status-title {
|
|
.status-title {
|
|
@@ -507,7 +523,6 @@ const changeExecutionMethod = (stageIndex, value) => {
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.status-sub {
|
|
.status-sub {
|
|
|
- margin-top: 2px;
|
|
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -515,7 +530,7 @@ const changeExecutionMethod = (stageIndex, value) => {
|
|
|
|
|
|
|
|
.work-wrap {
|
|
.work-wrap {
|
|
|
position: relative;
|
|
position: relative;
|
|
|
- top: -12px;
|
|
|
|
|
|
|
+ top: -16px;
|
|
|
padding: 0 12px 12px;
|
|
padding: 0 12px 12px;
|
|
|
z-index: 2;
|
|
z-index: 2;
|
|
|
margin-bottom: 60px;
|
|
margin-bottom: 60px;
|
|
@@ -526,6 +541,10 @@ const changeExecutionMethod = (stageIndex, value) => {
|
|
|
border-radius: 8px;
|
|
border-radius: 8px;
|
|
|
padding: 14px 10px 10px 10px;
|
|
padding: 14px 10px 10px 10px;
|
|
|
box-shadow: 0 2px 8px rgba(15, 35, 52, 0.06);
|
|
box-shadow: 0 2px 8px rgba(15, 35, 52, 0.06);
|
|
|
|
|
+ border: 1px solid transparent;
|
|
|
|
|
+ &.status-0 {
|
|
|
|
|
+ border: 1px solid #FF953D;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.group-info {
|
|
.group-info {
|
|
@@ -560,17 +579,35 @@ const changeExecutionMethod = (stageIndex, value) => {
|
|
|
line-height: 1.5;
|
|
line-height: 1.5;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
-.stage-card {
|
|
|
|
|
|
|
+.stage-card + .stage-card {
|
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
|
|
|
+}
|
|
|
|
|
+.stage-card {
|
|
|
|
|
|
|
|
.stage-header {
|
|
.stage-header {
|
|
|
padding-bottom: 12px;
|
|
padding-bottom: 12px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 5px;
|
|
|
|
|
|
|
|
.stage-title {
|
|
.stage-title {
|
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
|
color: #000;
|
|
color: #000;
|
|
|
}
|
|
}
|
|
|
|
|
+ .title-tag {
|
|
|
|
|
+ width: fit-content;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ height: 26px;
|
|
|
|
|
+ line-height: 26px;
|
|
|
|
|
+ color: #2199F8;
|
|
|
|
|
+ background: rgba(33, 153, 248, 0.1);
|
|
|
|
|
+ border-radius: 20px;
|
|
|
|
|
+ padding: 0 8px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .tag-0 {
|
|
|
|
|
+ color: #FF953D;
|
|
|
|
|
+ background: rgba(255, 149, 61, 0.1);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
.stage-info {
|
|
.stage-info {
|
|
@@ -691,6 +728,31 @@ const changeExecutionMethod = (stageIndex, value) => {
|
|
|
line-height: 21px;
|
|
line-height: 21px;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+.execute-action {
|
|
|
|
|
+ margin-top: 8px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ gap: 16px;
|
|
|
|
|
+ .action-item {
|
|
|
|
|
+ padding: 0 16px;
|
|
|
|
|
+ height: 32px;
|
|
|
|
|
+ line-height: 32px;
|
|
|
|
|
+ border-radius: 16px;
|
|
|
|
|
+ box-sizing: border-box;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ &.second {
|
|
|
|
|
+ background: #ffffff;
|
|
|
|
|
+ border: 0.5px solid rgba(153, 153, 153, 0.5);
|
|
|
|
|
+ color: #999999;
|
|
|
|
|
+ }
|
|
|
|
|
+ &.primary {
|
|
|
|
|
+ background: linear-gradient(180deg, #8ACBFF 0%, #2199F8 100%);
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
.fixed-btn-wrap {
|
|
.fixed-btn-wrap {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
justify-content: center;
|
|
justify-content: center;
|