From 5be9679fb4288936b576cf3d1f1548af1c4151b8 Mon Sep 17 00:00:00 2001
From: feiyu02 <risaku@163.com>
Date: 星期一, 21 七月 2025 15:31:21 +0800
Subject: [PATCH] 2025.7.21 任务管理-监管地图功能(待完成)
---
src/views/fysp/check/components/CompProblemCard.vue | 429 +++++++++++++++++++++++++++++++++++++++++++++-------
1 files changed, 366 insertions(+), 63 deletions(-)
diff --git a/src/views/fysp/check/components/CompProblemCard.vue b/src/views/fysp/check/components/CompProblemCard.vue
index 7423ba5..77f907d 100644
--- a/src/views/fysp/check/components/CompProblemCard.vue
+++ b/src/views/fysp/check/components/CompProblemCard.vue
@@ -1,10 +1,19 @@
<template>
- <el-card class="layout" shadow="hover">
- <el-steps :active="proStatus.index" finish-status="success" style="" align-center>
- <el-step v-for="(s, i) in getSteps" :key="i" :title="s" />
- </el-steps>
+ <el-card class="layout" shadow="never">
+ <!-- <el-row justify="space-between"> -->
+ <div>
+ <el-steps
+ :active="proStatus.index"
+ finish-status="success"
+ style=""
+ align-center
+ >
+ <el-step v-for="(s, i) in getSteps" :key="i" :title="s" />
+ </el-steps>
+ </div>
+ <!-- </el-row> -->
- <el-descriptions :column="3" size="small">
+ <el-descriptions :column="2" size="small" border>
<template #title>
<span class="d-index">{{ index }}</span>
<span class="d-title">{{ title }}</span>
@@ -25,18 +34,37 @@
v-for="(d, i) in descriptions"
:key="i"
:label="d.name"
- >{{ d.value }}</el-descriptions-item
>
+ <template #label>
+ <el-text tag="b" size="small">
+ {{ d.name }}
+ </el-text>
+ </template>
+ {{ d.value }}
+ </el-descriptions-item>
</el-descriptions>
<el-scrollbar>
- <el-descriptions title=" " :column="2" direction="vertical" size="small" border>
+ <el-descriptions
+ title=" "
+ :column="2"
+ direction="vertical"
+ size="small"
+ border
+ >
<template v-for="(pic, t) in pics" :key="t">
<template v-if="pic.path.length > 0">
<el-descriptions-item
:label="pic.title"
- :label-class-name="t == 0 ? 'descriptions-label-1' : 'descriptions-label-2'"
+ :label-class-name="
+ t == 0 ? 'descriptions-label-1' : 'descriptions-label-2'
+ "
>
+ <template #label>
+ <el-text tag="b" size="small">
+ {{ pic.title }}
+ </el-text>
+ </template>
<el-space>
<el-image
v-for="(p, i) in pic.path"
@@ -59,45 +87,150 @@
<el-row v-if="true" style="margin-top: 16px">
<el-col :span="12">
<el-row justify="start" class="btn-group">
- <el-button type="success" size="small" @click="updatePro" plain>淇敼闂</el-button>
- <el-button
- type="primary"
- size="small"
- @click="updateChange"
- plain
- :disabled="!proStatus.changeable"
- >淇敼鏁存敼</el-button
+ <el-button type="success" size="small" @click="updatePro" plain
+ >闂鏇存</el-button
+ >
+ <el-button type="primary" size="small" @click="updateChange" plain
+ >鏁存敼妫�楠�</el-button
+ >
+ <el-button type="info" size="small" @click="currProRecent" plain
+ >闂澶嶇幇</el-button
>
</el-row>
</el-col>
<el-col :span="12">
<el-row justify="end" class="btn-group">
- <el-button type="danger" size="small" @click="deletePro" :disabled="!proStatus.deletable"
+ <el-button
+ type="danger"
+ size="small"
+ @click="deletePro"
+ :disabled="true"
>鍒犻櫎</el-button
>
- <el-button type="warning" size="small" @click="rejectPro" :disabled="!proStatus.checkable"
- >椹冲洖</el-button
+ <!-- <el-button
+ type="danger"
+ size="small"
+ @click="deletePro"
+ :disabled="!proStatus.deletable"
+ >鍒犻櫎</el-button
+ > -->
+ <!-- 瀹℃牳椹冲洖鎿嶄綔 -->
+ <el-button
+ v-if="
+ this.problem.extension3 == 'fail' ||
+ this.problem.extension3 == 'change_fail'
+ "
+ type="danger"
+ size="small"
+ @click="revokePro"
+ :disabled="proStatus.checkable"
+ >鎾ら攢椹冲洖</el-button
>
- <el-button type="success" size="small" @click="passPro" :disabled="!proStatus.checkable"
- >閫氳繃</el-button
+ <el-button
+ v-else
+ type="warning"
+ size="small"
+ @click="rejectPro"
+ :disabled="!proStatus.checkable"
+ >瀹℃牳椹冲洖</el-button
+ >
+ <el-button
+ v-if="
+ this.problem.extension3 == 'pass' ||
+ this.problem.extension3 == 'change_pass'
+ "
+ type="danger"
+ size="small"
+ @click="revokePro"
+ :disabled="proStatus.checkable"
+ >鎾ら攢閫氳繃</el-button
+ >
+ <el-button
+ v-else
+ type="success"
+ size="small"
+ @click="passPro"
+ :disabled="!proStatus.checkable"
+ >瀹℃牳閫氳繃</el-button
>
</el-row>
</el-col>
</el-row>
</el-card>
+ <CompProblemAddOrUpd
+ title="闂鏇存"
+ v-if="proAddOrUpdDialogVisible"
+ v-model:visible="proAddOrUpdDialogVisible"
+ :problem="deepCopyPro"
+ :subtask="subtask"
+ :topTask="topTask"
+ ref="compProblemAddOrUpdRef"
+ @cancel="onProCanceled"
+ @submit="onProSubmited"
+ />
+ <!-- 鏁存敼 -->
+ <ComChangeEdit
+ :title="changeType == 1 ? '鏁存敼妫�楠�' : '鏁存敼鎻愪氦'"
+ v-if="changeDialogVisible"
+ v-model:visible="changeDialogVisible"
+ :changeType="changeType"
+ :problemId="problem.guid"
+ :subtask="subtask"
+ :month="month"
+ :oldChangeFileList="problem.mediafileList"
+ @cancel="onChangeCanceled"
+ @submit="onChangeSubmited"
+ />
+ <!-- 闂澶嶇幇 -->
+ <CompProRecent
+ title="闂澶嶇幇"
+ v-if="proRecentDialogVisible"
+ v-model:visible="proRecentDialogVisible"
+ :subtask="subtask"
+ :topTask="topTask"
+ :problem="problem"
+ />
</template>
<script>
-import ProCheckProxy from '../ProCheckProxy'
-import problemApi from '@/api/fysp/problemApi'
-import { useMessageBoxTip } from '@/composables/messageBox'
-
+import ProCheckProxy from '../ProCheckProxy';
+import problemApi from '@/api/fysp/problemApi';
+import { useMessageBoxTip } from '@/composables/messageBox';
+import CompProblemAddOrUpd from './CompProblemAddOrUpd.vue';
+import ComChangeEdit from './ComChangeEdit.vue';
+import CompProRecent from './CompProRecent.vue';
+import { useCloned } from '@vueuse/core';
export default {
+ emits: ['check', 'submit', 'cancel'],
+ components: {
+ CompProblemAddOrUpd,
+ ComChangeEdit,
+ CompProRecent
+ },
props: {
+ // 鍙閫夐」
+ readonly: {
+ type: Boolean,
+ default: () => {
+ return false;
+ }
+ },
+ topTask: {
+ type: Object,
+ default: () => {}
+ },
+ subtask: {
+ type: Object,
+ default: () => {}
+ },
+ insGuid: {
+ type: String,
+ default: () => ''
+ },
problem: {
type: Object,
default: () => {
- return {}
+ return {};
}
},
index: {
@@ -105,9 +238,19 @@
default: 1
}
},
- emits:['submit'],
data() {
return {
+ changeDialogVisible: false,
+ changeType: -1,
+ addChangeDialogVisible: false,
+ // 杩戞湡鎯呭喌
+ proRecentDialogVisible: false,
+ month: -1,
+ deepCopyPro: {},
+ deepCopySubtask: {},
+ deepCopyTopTask: {},
+ proAddOrUpdDialogVisible: false,
+ changeEditDialogVisible: false,
// 瀹℃牳姝ラ
steps: [
{
@@ -116,36 +259,49 @@
},
{
bef: '闂寰呮暣鏀�',
- aft: '闂宸叉暣鏀�'
+ aft: '鏁存敼宸蹭笂浼�'
},
{
bef: '鏁存敼寰呭鏍�',
- aft: '鏁存敼宸插鏍�'
+ aft: '闂宸叉暣鏀�'
}
]
- }
+ };
},
+ mounted() {},
computed: {
// 闂鍚嶇О
title() {
- return this.problem.problemname
+ return this.problem.problemname;
},
// 闂鎻忚堪
descriptions() {
- return [
+ const des = [
{
+ icon: 'Location',
name: '闂浣嶇疆',
value: this.problem.location
},
{
+ icon: 'Clock',
name: '鎻愪氦鏃堕棿',
value: this.problem.time.replace('T', ' ').split('.')[0]
}
- ]
+ ];
+ if (this.problem.ischanged) {
+ des.push({
+ icon: 'Clock',
+ name: '鏁存敼鏃堕棿',
+ value: this.problem.changedtime
+ ? this.problem.changedtime.replace('T', ' ').split('.')[0]
+ : this.problem.time.replace('T', ' ').split('.')[0]
+ });
+ }
+ return des;
},
// 闂鍥剧墖
pics() {
- return ProCheckProxy.proPics(this.problem)
+ return ProCheckProxy.proPics(this.problem);
},
/**
* 鑾峰彇褰撳墠闂瀹℃牳姝ラ
@@ -153,59 +309,148 @@
getSteps() {
return this.steps.map((v, i) => {
if (i >= this.proStatus.index) {
- return v.bef
+ return v.bef;
} else {
- return v.aft
+ return v.aft;
}
- })
+ });
},
// 闂鐘舵��
proStatus() {
- return ProCheckProxy.proStatusMap(this.problem.extension3)
+ return ProCheckProxy.proStatusMap(this.problem.extension3);
}
},
methods: {
- deletePro() {},
+ onProCanceled() {
+ this.proAddOrUpdDialogVisible = false;
+ },
+ onProSubmited(isOk) {
+ this.$emit('submit', isOk);
+ this.proAddOrUpdDialogVisible = false;
+ },
+ onChangeCanceled() {},
+ onChangeSubmited(isOk) {
+ this.$emit('submit', isOk);
+ this.changeDialogVisible = false;
+ },
+ deletePro() {
+ useMessageBoxTip({
+ confirmMsg: '鏄惁鍒犻櫎闂',
+ confirmTitle: '纭畾',
+ onConfirm: () => {
+ return problemApi
+ .deleteProblem({
+ pid: this.problem.guid
+ })
+ .then((res) => {
+ if (res.success) {
+ this.$emit('submit');
+ }
+ });
+ }
+ });
+ },
rejectPro() {
- this.checkPro(false)
+ this.checkPro(false);
},
passPro() {
- this.checkPro(true)
+ this.checkPro(true);
+ },
+ revokePro() {
+ const pro = this.problem;
+ let status = this.proStatus;
+ let doneMsg;
+ if (status.index <= 2) {
+ doneMsg = '闂鏈鏍�';
+ } else if (status.index <= 3) {
+ doneMsg = '鏁存敼鏈鏍�';
+ }
+ useMessageBoxTip({
+ confirmMsg: `纭鎾ゅ洖鍒�${doneMsg}锛焋,
+ confirmTitle: '瀹℃牳鎾ゅ洖',
+ onConfirm: () => {
+ const { status, action } = ProCheckProxy.proBeforeStatus(
+ pro.extension3
+ );
+ return problemApi
+ .checkProblem({ pId: pro.guid, action: action })
+ .then((res) => {
+ if (res.success) {
+ pro.extension3 = status;
+ this.$emit('check');
+ }
+ });
+ }
+ });
},
checkPro(pass) {
- const pro = this.problem
- let doneMsg = pass ? '閫氳繃' : '椹冲洖'
+ const pro = this.problem;
+ let doneMsg = pass ? '閫氳繃' : '椹冲洖';
useMessageBoxTip({
confirmMsg: `纭鏄惁${doneMsg}璇ラ棶棰橈紵`,
confirmTitle: '闂瀹℃牳',
onConfirm: () => {
- const { status, action } = ProCheckProxy.proNextStatus(pro.extension3, pass)
- return problemApi.checkProblem({ pId: pro.guid, action: action }).then((res) => {
- if (res.success) {
- pro.extension3 = status
- this.$emit('submit')
- }
- })
+ const { status, action } = ProCheckProxy.proNextStatus(
+ pro.extension3,
+ pass
+ );
+ return problemApi
+ .checkProblem({ pId: pro.guid, action: action })
+ .then((res) => {
+ if (res.success) {
+ pro.extension3 = status;
+ this.$emit('check');
+ }
+ });
}
- })
+ });
},
- updatePro() {},
- updateChange() {}
+ updatePro() {
+ this.deepCopyPro = useCloned(this.problem).cloned.value;
+ this.$nextTick(() => {
+ this.proAddOrUpdDialogVisible = true;
+ });
+ },
+ getCurrentMouth() {
+ // 浣跨敤Date瀵硅薄瑙f瀽鏃ユ湡瀛楃涓�
+ var date = new Date(this.subtask.subtask.planstarttime);
+ // 鑾峰彇鏈堜唤淇℃伅锛屾湀浠芥槸浠�0寮�濮嬬殑锛屾墍浠ラ渶瑕佸姞1
+ this.month = date.getMonth() + 1;
+ if (String(this.month).length == 1) {
+ this.month = `0${this.month}`;
+ }
+ // 鑾峰彇骞翠唤
+ var year = date.getFullYear();
+ this.month = `${year}-${this.month}`;
+ },
+ updateChange() {
+ this.getCurrentMouth();
+ if (!this.problem.ischanged) {
+ this.changeType = 0;
+ } else {
+ this.changeType = 1;
+ }
+ this.changeDialogVisible = true;
+ },
+ currProRecent() {
+ this.proRecentDialogVisible = true;
+ }
}
-}
+};
</script>
<style scoped>
.layout {
background-color: transparent;
- margin-top: 20px;
+ margin-bottom: 20px;
/* border: none; */
- border-color: rgba(0, 0, 0, 0.308);
+ /* border-color: rgba(0, 0, 0, 0.308); */
}
.image {
- width: 200px;
- height: 210px;
+ width: 240px;
+ height: 250px;
border-radius: 4px;
+ margin-bottom: 6px;
}
.d-index {
@@ -229,13 +474,71 @@
.d-extra {
}
-.descriptions-label-1 {
- color: whitesmoke;
- background: var(--el-color-danger-light-3);
+:deep(.descriptions-label-1) {
+ /* color: whitesmoke; */
+ /* background: var(--el-color-danger-light-3); */
}
.descriptions-label-2 {
- color: whitesmoke;
- background-color: var(--el-color-success-light-3);
+ /* color: whitesmoke; */
+ /* background-color: var(--el-color-success-light-3); */
+}
+</style>
+
+<!-- 姝ラ鏉¤嚜瀹氫箟鏍峰紡 -->
+<style scoped>
+:deep(.el-steps--simple) {
+ background: #fffbf731;
+}
+
+:deep(.is-wait .el-step__icon) {
+ height: 17px;
+ width: 17px;
+ margin-top: 3px;
+}
+
+:deep(.is-wait .is-text .el-step__icon-inner) {
+ font-size: var(--el-font-size-small);
+}
+
+:deep(.is-success .el-step__icon) {
+ height: 17px;
+ width: 17px;
+ margin-top: 3px;
+}
+
+:deep(.is-success .is-text .el-step__icon-inner) {
+ font-size: var(--el-font-size-small);
+}
+
+:deep(.el-step__head.is-process) {
+ border-color: var(--el-color-danger);
+ color: var(--el-color-danger);
+}
+
+:deep(.el-step__head.is-wait) {
+ border-color: var(--el-text-color-placeholder);
+ color: var(--el-text-color-placeholder);
+}
+
+:deep(.el-step__head.is-success) {
+ border-color: var(--el-color-success-light-3);
+ color: var(--el-color-success-light-3);
+}
+
+:deep(.el-step__title.is-process) {
+ color: var(--el-color-danger);
+ font-weight: bolder;
+ font-size: var(--el-font-size-large);
+}
+
+:deep(.el-step__title.is-wait) {
+ color: var(--el-text-color-placeholder);
+ font-size: var(--el-font-size-small);
+}
+
+:deep(.el-step__title.is-success) {
+ color: var(--el-color-success-light-3);
+ font-size: var(--el-font-size-small);
}
</style>
--
Gitblit v1.9.3