From d2eaa00bbee1fb2d081a8767d888efe77186cb7e Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期五, 29 十一月 2024 04:00:59 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
src/views/projectManage/plan/planInfo.vue | 22 +-
src/views/projectManage/progress/progressRecord.vue | 107 ++++++++-----
src/views/projectManage/plan/index.vue | 62 +-----
src/api/projectPlan/index.js | 40 ++--
src/views/projectManage/plan/planInfoCheck.vue | 107 ++++++++----
src/api/projectManage/progress/index.js | 16 ++
src/views/projectManage/progress/index.vue | 2
src/views/projectManage/plan/planRecord.vue | 79 ++++++---
8 files changed, 244 insertions(+), 191 deletions(-)
diff --git a/src/api/projectManage/progress/index.js b/src/api/projectManage/progress/index.js
index e5c2eda..ade3e9b 100644
--- a/src/api/projectManage/progress/index.js
+++ b/src/api/projectManage/progress/index.js
@@ -50,5 +50,21 @@
})
}
+// 淇濆瓨绔e伐鎶ュ憡銆佹儏鍐佃鏄庨檮浠�
+export function saveProjectProgressFileLists(data) {
+ return request({
+ url: '/api/progress-plan/saveProjectProgressFileLists',
+ method: 'post',
+ data: data
+ })
+}
+
+export function getProjectProgressForm(id) {
+ return request({
+ url: '/api/progress-plan/getProjectProgressForm/' + id,
+ method: 'get'
+ })
+}
+
diff --git a/src/api/projectPlan/index.js b/src/api/projectPlan/index.js
index d3e00b2..43f804e 100644
--- a/src/api/projectPlan/index.js
+++ b/src/api/projectPlan/index.js
@@ -9,6 +9,14 @@
})
}
+// 鑾峰彇涓荤鏍囪瘑
+export function getManagerFlag(recordId) {
+ return request({
+ url: '/project/info/getManagerFlag/'+ recordId,
+ method: 'get'
+ })
+}
+
// 鏌ヨ璁″垝璁板綍鍒楄〃
export function getPlanRecordList(id) {
return request({
@@ -17,28 +25,11 @@
})
}
-// 鏌ヨ椤圭洰璁″垝璁板綍璇︾粏
-export function getRecord(id) {
- return request({
- url: '/plan/record/' + id,
- method: 'get'
- })
-}
-
// 鏂板椤圭洰璁″垝璁板綍
export function addRecord(data) {
return request({
url: '/api/project-plan-record',
method: 'post',
- data: data
- })
-}
-
-// 淇敼椤圭洰璁″垝璁板綍
-export function updateRecord(data) {
- return request({
- url: '/plan/record',
- method: 'put',
data: data
})
}
@@ -94,10 +85,19 @@
})
}
-// 鍥炲涓婄骇鎵瑰
-export function replyDepartmentApproval(data) {
+// 淇濆瓨瀹℃壒
+export function saveExamine(data) {
return request({
- url: '/api/project-plan-examine-record/replyDepartmentApproval',
+ url: '/api/project-plan-examine-record/saveExamine',
+ method: 'post',
+ data: data
+ })
+}
+
+// 鍥炲瀹℃壒
+export function replyExamine(data) {
+ return request({
+ url: '/api/project-plan-examine-record/replyExamine',
method: 'post',
data: data
})
diff --git a/src/views/projectManage/plan/index.vue b/src/views/projectManage/plan/index.vue
index 676cbd7..ac6e35f 100644
--- a/src/views/projectManage/plan/index.vue
+++ b/src/views/projectManage/plan/index.vue
@@ -189,12 +189,14 @@
</template>
<script>
-import { getList, getRecord, delRecord, addRecord, updateRecord } from "@/api/projectPlan/index";
+import {getList, getManagerFlag} from "@/api/projectPlan/index";
export default {
- name: "index",
+ name: "Index",
data() {
return {
+ // 涓荤鏍囪瘑
+ managerFlag: undefined,
// 閬僵灞�
loading: true,
// 閫変腑鏁扮粍
@@ -280,46 +282,6 @@
this.open = true;
this.title = "娣诲姞椤圭洰璁″垝璁板綍";
},
- /** 淇敼鎸夐挳鎿嶄綔 */
- handleUpdate(row) {
- this.reset();
- const id = row.id || this.ids
- getRecord(id).then(response => {
- this.form = response.data;
- this.open = true;
- this.title = "淇敼椤圭洰璁″垝璁板綍";
- });
- },
- /** 鎻愪氦鎸夐挳 */
- submitForm() {
- this.$refs["form"].validate(valid => {
- if (valid) {
- if (this.form.id != null) {
- updateRecord(this.form).then(response => {
- this.$modal.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- });
- } else {
- addRecord(this.form).then(response => {
- this.$modal.msgSuccess("鏂板鎴愬姛");
- this.open = false;
- this.getList();
- });
- }
- }
- });
- },
- /** 鍒犻櫎鎸夐挳鎿嶄綔 */
- handleDelete(row) {
- const ids = row.id || this.ids;
- this.$modal.confirm('鏄惁纭鍒犻櫎椤圭洰璁″垝璁板綍缂栧彿涓�"' + ids + '"鐨勬暟鎹」锛�').then(function() {
- return delRecord(ids);
- }).then(() => {
- this.getList();
- this.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(() => {});
- },
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
this.download('plan/record/export', {
@@ -328,12 +290,18 @@
},
/** 鏌ョ湅椤圭洰璁″垝璁板綍 */
handlePlanRecord(row) {
- this.$router.push({
- path: '/projectManage/planRecord',
- query: {
- data: row
- }
+ // 鑾峰緱涓荤鏍囧織
+ getManagerFlag(row.id).then(res => {
+ this.managerFlag = res.data;
+ row.managerFlag = this.managerFlag;
+ this.$router.push({
+ path: '/projectManage/planRecord',
+ query: {
+ data: row
+ }
+ })
})
+
}
}
};
diff --git a/src/views/projectManage/plan/planInfo.vue b/src/views/projectManage/plan/planInfo.vue
index 9608965..bf620a5 100644
--- a/src/views/projectManage/plan/planInfo.vue
+++ b/src/views/projectManage/plan/planInfo.vue
@@ -1,8 +1,8 @@
<template>
<div class="app-container">
<el-container>
- <el-header v-show="planRecordData && planRecordData.projectName" class="header-title">椤圭洰鍚嶇О锛歿{ planRecordData.projectName }} {{ planRecordData.planTimeFlag === 0 ? '(鏈堝害璁″垝)' : planRecordData.planTimeFlag === 1 ? '(瀛e害璁″垝)' : '(骞村害璁″垝)' }}</el-header>
- <h4 v-show="planRecordData && planRecordData.projectCode" style="text-align: center">椤圭洰浠g爜锛歿{ planRecordData.projectCode }}</h4>
+ <el-header class="header-title">椤圭洰鍚嶇О锛歿{ planInfoData.projectName }} ({{planInfoData.planTime}} {{ planInfoData.planTimeFlag === 0 ? '鏈堝害璁″垝' : planInfoData.planTimeFlag === 1 ? '瀛e害璁″垝' : '骞村害璁″垝' }})</el-header>
+ <h4 style="text-align: center">椤圭洰浠g爜锛歿{ planInfoData.projectCode }}</h4>
<el-main>
<el-card shadow="hover">
<el-row :gutter="20">
@@ -30,9 +30,9 @@
<el-date-picker v-model="scope.row.endTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" />
</template>
</el-table-column>
- <el-table-column :label="planRecordData.planTimeFlag === 0 ? '鏈堝害' : planRecordData.planTimeFlag === 1 ? '瀛e害' : '骞村害' " width="100" align="center">
+ <el-table-column :label="planInfoData.planTimeFlag === 0 ? '鏈堝害' : planInfoData.planTimeFlag === 1 ? '瀛e害' : '骞村害' " width="100" align="center">
<template #default="scope">
- <span>{{ planRecordData.planTime }}{{ planRecordData.planTimeFlag === 0 ? '鏈堝害' : planRecordData.planTimeFlag === 1 ? '瀛e害' : '骞村害' }}</span>
+ <span>{{ planInfoData.planTime }}{{ planInfoData.planTimeFlag === 0 ? '鏈堝害' : planInfoData.planTimeFlag === 1 ? '瀛e害' : '骞村害' }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="鎿嶄綔" align="center">
@@ -72,12 +72,12 @@
import { getPlanInfoData, addPlanInfo, savePlanInfo } from "@/api/projectPlan/index";
export default {
- name: "planInfo",
+ name: "PlanInfo",
data() {
return {
loading: true,
// 鎺ユ敹浼犻�掕繃鏉ョ殑椤圭洰璁″垝鏁版嵁
- planRecordData: {},
+ projectInfoData: {},
planInfoData: {},
tableData: [
{
@@ -103,9 +103,9 @@
this.getPlanInfoData(this.planInfoData.id);
},
// 鑾峰彇浼犻�掕繃鏉ョ殑椤圭洰璁″垝璇︽儏
- getPlanRecordData() {
+ getProjectInfoData() {
// 浠庢煡璇㈠弬鏁颁腑鑾峰彇鏁版嵁
- this.planRecordData = this.$route.query.planRecordData
+ this.projectInfoData = this.$route.query.projectInfoData
this.planInfoData = this.$route.query.data
this.search();
},
@@ -159,7 +159,7 @@
},
// 淇濆瓨褰撳墠琛屾暟鎹�
handleSave(index) {
- this.tableData[index].projectPlanRecordId = this.planRecordData.id;
+ this.tableData[index].projectPlanRecordId = this.projectInfoData.id;
savePlanInfo(this.tableData[index]).then(response => {
this.search();
this.$message.success('淇濆瓨鎴愬姛');
@@ -170,13 +170,13 @@
this.$router.push({
path: '/projectManage/planRecord',
query: {
- data: this.planRecordData
+ data: this.projectInfoData
}
})
}
},
created() {
- this.getPlanRecordData();
+ this.getProjectInfoData();
},
};
</script>
diff --git a/src/views/projectManage/plan/planInfoCheck.vue b/src/views/projectManage/plan/planInfoCheck.vue
index ae85cde..0a3ed72 100644
--- a/src/views/projectManage/plan/planInfoCheck.vue
+++ b/src/views/projectManage/plan/planInfoCheck.vue
@@ -1,8 +1,8 @@
<template>
<div class="app-container">
<el-container>
- <el-header v-show="planRecordData && planRecordData.projectName" class="header-title">椤圭洰鍚嶇О锛歿{ planRecordData.projectName }} {{ planRecordData.planTimeFlag === 0 ? '(鏈堝害璁″垝)' : planRecordData.planTimeFlag === 1 ? '(瀛e害璁″垝)' : '(骞村害璁″垝)' }}</el-header>
- <h4 v-show="planRecordData && planRecordData.projectCode" style="text-align: center">椤圭洰浠g爜锛歿{ planRecordData.projectCode }}</h4>
+ <el-header class="header-title">椤圭洰鍚嶇О锛歿{ planInfoData.projectName }} ({{ planInfoData.planTime}} {{ planInfoData.planTimeFlag === 0 ? '鏈堝害璁″垝' : planInfoData.planTimeFlag === 1 ? '瀛e害璁″垝' : '骞村害璁″垝' }})</el-header>
+ <h4 style="text-align: center">椤圭洰浠g爜锛歿{ planInfoData.projectCode }}</h4>
<el-main>
<el-card shadow="hover">
<el-row :gutter="20">
@@ -17,34 +17,36 @@
</el-table-column>
<el-table-column prop="taskName" label="浜嬮」鍚嶇О" width="500" align="center">
<template #default="scope">
- <el-input type="textarea" v-model="scope.row.title" placeholder="璇疯緭鍏�" rows="3" />
+ <el-input type="textarea" v-model="scope.row.title" placeholder="璇疯緭鍏�" rows="3" readonly />
</template>
</el-table-column>
- <el-table-column prop="startTime" label="璁″垝寮�濮嬫椂闂�" width="160" align="center">
+ <el-table-column prop="startTime" label="璁″垝寮�濮嬫椂闂�" width="160" align="center" >
<template #default="scope">
- <el-date-picker v-model="scope.row.startTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px"/>
+ <el-date-picker v-model="scope.row.startTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" :readonly="projectInfoData.managerFlag"/>
</template>
</el-table-column>
- <el-table-column prop="endTime" label="璁″垝瀹屾垚鏃堕棿" width="160" align="center">
+ <el-table-column prop="endTime" label="璁″垝瀹屾垚鏃堕棿" width="160" align="center" >
<template #default="scope">
- <el-date-picker v-model="scope.row.endTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px"/>
+ <el-date-picker v-model="scope.row.endTime" type="date" placeholder="閫夋嫨鏃ユ湡" size="small" style="width: 130px" :readonly="projectInfoData.managerFlag" />
</template>
</el-table-column>
- <el-table-column :label="planRecordData.planTimeFlag === 0 ? '鏈堝害' : planRecordData.planTimeFlag === 1 ? '瀛e害' : '骞村害' " width="100" align="center">
+ <el-table-column :label="planInfoData.planTimeFlag === 0 ? '鏈堝害' : planInfoData.planTimeFlag === 1 ? '瀛e害' : '骞村害' " align="center">
<template #default="scope">
- <span>{{ planRecordData.planTime }}{{ planRecordData.planTimeFlag === 0 ? '鏈堝害' : planRecordData.planTimeFlag === 1 ? '瀛e害' : '骞村害' }}</span>
+ <span>{{ planInfoData.planTime }}{{ planInfoData.planTimeFlag === 0 ? '鏈堝害' : planInfoData.planTimeFlag === 1 ? '瀛e害' : '骞村害' }}</span>
</template>
</el-table-column>
- <el-table-column fixed="right" label="鎿嶄綔" align="center">
- <template #default="scope">
- <el-button size="small" @click="handleDelay(scope.$index)">寤舵湡</el-button>
- <el-button size="small" type="danger" @click="handleReset(scope.$index)">閲嶇疆</el-button>
- </template>
- </el-table-column>
+ <div v-if="!projectInfoData.managerFlag">
+ <el-table-column fixed="right" label="鎿嶄綔" align="center">
+ <template #default="scope">
+ <el-button size="small" @click="handleDelay(scope.$index)">寤舵湡</el-button>
+ <el-button size="small" type="danger" @click="handleReset(scope.$index)">閲嶇疆</el-button>
+ </template>
+ </el-table-column>
+ </div>
</el-table>
<div style="display: flex; align-items: center;">
<h1 style="margin: 0;">
- 鎴鏈鍒掕繘搴﹀畬鎴愭姇璧勶紙涓囧厓锛夛細
+ 璁″垝鎶曡祫閲戦锛堜竾鍏冿級锛�
</h1>
<el-input
placeholder="璇疯緭鍏ユ姇璧勯噾棰�"
@@ -52,7 +54,8 @@
v-model="actualInvest"
clearable
:type="number"
- @input="handleInput">
+ @input="handleInput"
+ readonly>
</el-input>
</div>
@@ -67,32 +70,55 @@
</template>
</el-table-column>
<el-table-column prop="title" label="浜嬮」鍚嶇О" width="200" align="center" />
- <el-table-column prop="departmentExamine" label="涓婄骇瀹℃牳" width="100" align="center">
- <template #default="scope">
+ <el-table-column prop="departmentExamine" label="涓婄骇瀹℃牳" width="130" align="center">
+ <template #default="scope" v-if="!projectInfoData.managerFlag">
{{ scope.row.departmentExamine === 0 ? '鍚屾剰' : scope.row.departmentExamine === 1 ? '椹冲洖' : '鏈鏍�' }}
</template>
+ <template v-if="projectInfoData.managerFlag" #default="scope">
+ <el-select v-model="scope.row.departmentExamine" placeholder="璇烽�夋嫨" size="small" clearable>
+ <el-option label="鍚屾剰" :value="0"></el-option>
+ <el-option label="椹冲洖" :value="1"></el-option>
+ </el-select>
+ </template>
</el-table-column>
- <el-table-column prop="departmentApproval" label="鎵瑰鍐呭" width="160" align="center" />
+ <el-table-column prop="departmentApproval" label="鎵瑰鍐呭" width="160" align="center">
+ <template v-if="projectInfoData.managerFlag" #default="scope">
+ <el-input type="textarea" v-model="scope.row.departmentApproval" placeholder="璇疯緭鍏�" rows="3" />
+ </template>
+ </el-table-column>
<el-table-column prop="departmentApprovalReply" label="鎵瑰鍥炲" width="160" align="center">
- <template #default="scope">
+ <template #default="scope" v-if="!projectInfoData.managerFlag">
<el-input type="textarea" v-model="scope.row.departmentApprovalReply" placeholder="璇疯緭鍏�" rows="3" />
</template>
</el-table-column>
- <el-table-column prop="manageExamine" label="涓荤閮ㄩ棬瀹℃牳" width="100" align="center" >
- <template #default="scope">
+ <el-table-column prop="manageExamine" label="涓荤閮ㄩ棬瀹℃牳" width="130" align="center" >
+ <template #default="scope" v-if="!projectInfoData.managerFlag">
{{ scope.row.manageExamine === 0 ? '鍚屾剰' : scope.row.manageExamine === 1 ? '椹冲洖' : '鏈鏍�' }}
</template>
+ <template v-if="projectInfoData.managerFlag" #default="scope">
+ <el-select v-model="scope.row.manageExamine" placeholder="璇烽�夋嫨" size="small" clearable>
+ <el-option label="鍚屾剰" :value="0"></el-option>
+ <el-option label="椹冲洖" :value="1"></el-option>
+ </el-select>
+ </template>
</el-table-column>
- <el-table-column prop="manageApproval" label="鎵瑰鍐呭" width="160" align="center" />
+ <el-table-column prop="manageApproval" label="鎵瑰鍐呭" width="160" align="center">
+ <template v-if="projectInfoData.managerFlag" #default="scope">
+ <el-input type="textarea" v-model="scope.row.manageApproval" placeholder="璇疯緭鍏�" rows="3" />
+ </template>
+ </el-table-column>
<el-table-column prop="manageApprovalReply" label="鎵瑰鍥炲" width="160" align="center">
- <template #default="scope">
+ <template #default="scope" v-if="!projectInfoData.managerFlag">
<el-input type="textarea" v-model="scope.row.manageApprovalReply" placeholder="璇疯緭鍏�" rows="3" />
</template>
</el-table-column>
<el-table-column fixed="right" label="鎿嶄綔" align="center">
- <template #default="scope">
+ <template #default="scope" v-if="!projectInfoData.managerFlag">
<el-button size="small" @click="handleReply(scope.$index)">鍥炲</el-button>
<el-button size="small" type="danger" @click="handleReset(scope.$index)">閲嶇疆</el-button>
+ </template>
+ <template v-if="projectInfoData.managerFlag" #default="scope">
+ <el-button size="small" @click="handleSave(scope.$index)">淇濆瓨</el-button>
</template>
</el-table-column>
</el-table>
@@ -134,16 +160,16 @@
</template>
<script>
-import { getPlanInfoData, delayPlanInfo, getDepartmentApproval, getPlanLog, replyDepartmentApproval } from "@/api/projectPlan/index";
+import { getPlanInfoData, delayPlanInfo, getDepartmentApproval, getPlanLog, replyExamine, saveExamine } from "@/api/projectPlan/index";
export default {
- name: "planInfoCheck",
+ name: "PlanInfoCheck",
data() {
return {
loading: true,
// 鎺ユ敹浼犻�掕繃鏉ョ殑椤圭洰璁″垝鏁版嵁
- planRecordData: {},
planInfoData: {},
+ projectInfoData: {},
// 璁″垝椤规暟鎹�
tableData: [
{
@@ -170,15 +196,15 @@
methods: {
// 椤甸潰鍔犺浇
search() {
- this.getPlanInfoData(this.planRecordData.id); // 鑾峰彇椤圭洰璁″垝椤�
- this.getDepartmentApproval(this.planRecordData.id); // 鑾峰彇涓婄骇鎵瑰
- this.getPlanLog(this.planRecordData.id); // 鑾峰彇璁″垝鏃ュ織
+ this.getPlanInfoData(this.planInfoData.id); // 鑾峰彇椤圭洰璁″垝椤�
+ this.getDepartmentApproval(this.planInfoData.id); // 鑾峰彇涓婄骇鎵瑰
+ this.getPlanLog(this.planInfoData.id); // 鑾峰彇璁″垝鏃ュ織
},
// 鑾峰彇浼犻�掕繃鏉ョ殑椤圭洰璁″垝璇︽儏
getPlanRecordData() {
// 浠庢煡璇㈠弬鏁颁腑鑾峰彇鏁版嵁
- this.planRecordData = this.$route.query.data
- this.planInfoData = this.$route.query.planInfoData
+ this.planInfoData = this.$route.query.data
+ this.projectInfoData = this.$route.query.projectInfoData
this.search();
},
// 鑾峰彇椤圭洰璁″垝椤�
@@ -205,14 +231,19 @@
this.departmentApprovalData = response.data;
});
},
- // 鍥炲
+ // 鍥炲瀹℃壒
handleReply(index) {
- replyDepartmentApproval(this.departmentApprovalData[index]).then(response => {
+ replyExamine(this.departmentApprovalData[index]).then(response => {
this.$message.success('鍥炲鎴愬姛');
this.search()
});
},
-
+ // 淇濆瓨瀹℃壒
+ handleSave(index) {
+ saveExamine(this.departmentApprovalData[index]).then(response => {
+ this.$message.success('淇濆瓨鎴愬姛');
+ });
+ },
// 鑾峰彇璁″垝鏃ュ織
getPlanLog(projectPlanRecordId) {
getPlanLog(projectPlanRecordId).then(response => {
@@ -230,7 +261,7 @@
this.$router.push({
path: '/projectManage/planRecord',
query: {
- data: this.planRecordData
+ data: this.projectInfoData
}
})
}
diff --git a/src/views/projectManage/plan/planRecord.vue b/src/views/projectManage/plan/planRecord.vue
index 489139f..dc9e845 100644
--- a/src/views/projectManage/plan/planRecord.vue
+++ b/src/views/projectManage/plan/planRecord.vue
@@ -1,15 +1,15 @@
<template>
<div class="app-container">
<el-container>
- <el-header v-show="planRecordData && planRecordData.projectName" class="header-title">椤圭洰鍚嶇О锛歿{ planRecordData.projectName }}</el-header>
- <h4 v-show="planRecordData && planRecordData.projectCode" style="text-align: center">椤圭洰浠g爜锛歿{ planRecordData.projectCode }}</h4>
+ <el-header v-show="projectInfoData && projectInfoData.projectName" class="header-title">椤圭洰鍚嶇О锛歿{ projectInfoData.projectName }}</el-header>
+ <h4 v-show="projectInfoData && projectInfoData.projectCode" style="text-align: center">椤圭洰浠g爜锛歿{ projectInfoData.projectCode }}</h4>
<el-main>
<el-card shadow="hover">
<el-row :gutter="20">
<el-col :span="24" class="mb-4">
<div style="margin-bottom: 10px">
<span style="font-size: 20px; font-weight: bold;">鏈堝害璁″垝</span>
- <el-button type="primary" size="small" style="float: right" @click="handleAddMonthPlan">鏂板</el-button>
+ <el-button type="primary" size="small" style="float: right" @click="handleAddMonthPlan" v-show="!projectInfoData.managerFlag">鏂板</el-button>
</div>
<el-table :data="monthRecords" border stripe style="width: 100%; margin-bottom: 20px">
<!-- 琛ㄥご -->
@@ -26,9 +26,14 @@
<el-table-column prop="createTime" label="鍒涘缓鏃堕棿" align="center" />
<el-table-column fixed="right" label="鎿嶄綔" align="center">
<template slot-scope="scope">
- <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">缂栬緫涓婃姤</el-button>
- <el-button type="danger" size="small" v-show="scope.row.reportStatus === 1" @click="handleDeletePlanRecord(scope.row.id)">鍒犻櫎</el-button>
- <el-button type="danger" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">鏌ョ湅</el-button>
+ <div v-show="!projectInfoData.managerFlag">
+ <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">缂栬緫涓婃姤</el-button>
+ <el-button type="danger" size="small" v-show="scope.row.reportStatus === 1" @click="handleDeletePlanRecord(scope.row.id)">鍒犻櫎</el-button>
+ <el-button type="danger" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">鏌ョ湅</el-button>
+ </div>
+ <div v-show="projectInfoData.managerFlag">
+ <el-button type="primary" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">鏌ョ湅</el-button>
+ </div>
</template>
</el-table-column>
</el-table>
@@ -36,7 +41,7 @@
<el-col :span="24" class="mb-4" style="margin-top: 20px">
<div style="margin-bottom: 10px">
<span style="font-size: 20px; font-weight: bold;">瀛e害璁″垝</span>
- <el-button type="primary" size="small" style="float: right" @click="handleAddSeasonPlan">鏂板</el-button>
+ <el-button type="primary" size="small" style="float: right" @click="handleAddSeasonPlan" v-show="!projectInfoData.managerFlag">鏌ョ湅</el-button>
</div>
<el-table :data="seasonRecords" border stripe style="width: 100%; margin-bottom: 20px">
<!-- 琛ㄥご -->
@@ -53,9 +58,14 @@
<el-table-column prop="createTime" label="鍒涘缓鏃堕棿" align="center" />
<el-table-column fixed="right" label="鎿嶄綔" align="center">
<template slot-scope="scope">
- <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">缂栬緫涓婃姤</el-button>
- <el-button type="danger" size="small" v-show="scope.row.reportStatus === 1" @click="handleDeletePlanRecord(scope.row.id)">鍒犻櫎</el-button>
- <el-button type="danger" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">鏌ョ湅</el-button>
+ <div v-show="!projectInfoData.managerFlag">
+ <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">缂栬緫涓婃姤</el-button>
+ <el-button type="danger" size="small" v-show="scope.row.reportStatus === 1" @click="handleDeletePlanRecord(scope.row.id)">鍒犻櫎</el-button>
+ <el-button type="danger" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">鏌ョ湅</el-button>
+ </div>
+ <div v-show="projectInfoData.managerFlag">
+ <el-button type="primary" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">鏌ョ湅</el-button>
+ </div>
</template>
</el-table-column>
</el-table>
@@ -63,7 +73,7 @@
<el-col :span="24" class="mb-4" style="margin-top: 20px">
<div style="margin-bottom: 10px">
<span style="font-size: 20px; font-weight: bold;">骞村害璁″垝</span>
- <el-button type="primary" size="small" style="float: right" @click="handleAddYearPlan">鏂板</el-button>
+ <el-button type="primary" size="small" style="float: right" @click="handleAddYearPlan" v-show="!projectInfoData.managerFlag">鏂板</el-button>
</div>
<el-table :data="yearRecords" border stripe style="width: 100%; margin-bottom: 20px">
<!-- 琛ㄥご -->
@@ -80,9 +90,14 @@
<el-table-column prop="createTime" label="鍒涘缓鏃堕棿" align="center" />
<el-table-column fixed="right" label="鎿嶄綔" align="center">
<template slot-scope="scope">
- <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">缂栬緫涓婃姤</el-button>
- <el-button type="danger" size="small" v-show="scope.row.reportStatus === 1" @click="handleDeletePlanRecord(scope.row.id)">鍒犻櫎</el-button>
- <el-button type="danger" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">鏌ョ湅</el-button>
+ <div v-show="!projectInfoData.managerFlag">
+ <el-button type="primary" size="small" :disabled="scope.row.reportStatus === 0" @click="handlePlanInfo(scope.row)">缂栬緫涓婃姤</el-button>
+ <el-button type="danger" size="small" v-show="scope.row.reportStatus === 1" @click="handleDeletePlanRecord(scope.row.id)">鍒犻櫎</el-button>
+ <el-button type="danger" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">鏌ョ湅</el-button>
+ </div>
+ <div v-show="projectInfoData.managerFlag">
+ <el-button type="primary" size="small" v-show="scope.row.reportStatus === 0" @click="handleCheckPlanInfo(scope.row)">鏌ョ湅</el-button>
+ </div>
</template>
</el-table-column>
</el-table>
@@ -102,7 +117,7 @@
data() {
return {
// 鎺ユ敹浼犻�掕繃鏉ョ殑椤圭洰璁″垝鏁版嵁
- planRecordData: {},
+ projectInfoData: {},
// 鏈堝害璁″垝鏁版嵁
monthRecords: [],
// 瀛e害璁″垝鏁版嵁
@@ -114,13 +129,14 @@
methods: {
// 椤甸潰鍔犺浇
search() {
- this.getPlanRecordData(this.planRecordData.id);
+ this.getPlanRecordData(this.projectInfoData.id);
+ console.log(this.projectInfoData);
},
// 鑾峰彇浼犻�掕繃鏉ョ殑椤圭洰璁″垝璇︽儏
- getPlanInfoData() {
+ getProjectInfoData() {
// 浠庢煡璇㈠弬鏁颁腑鑾峰彇鏁版嵁
- this.planRecordData = this.$route.query.data
- this.getPlanRecordData(this.planRecordData.id);
+ this.projectInfoData = this.$route.query.data
+ this.search();
},
// 鑾峰彇椤圭洰璁″垝璁板綍鏁版嵁
getPlanRecordData(id) {
@@ -136,13 +152,13 @@
handleAddMonthPlan() {
let planRecordData = {
id: undefined,
- projectInfoId: this.planRecordData.id,
+ projectInfoId: this.projectInfoData.id,
planTimeFlag: 0
}
// 鍒ゆ柇鏈堝害璁″垝鏄惁涓虹┖
- if (this.monthRecords.length === 0){
+ if (this.monthRecords.length === 0) {
planRecordData.id = 0;
- }else {
+ } else {
planRecordData.id = this.monthRecords[this.monthRecords.length - 1].id;
}
// 鏂板涓�琛岃褰�
@@ -154,13 +170,13 @@
handleAddSeasonPlan() {
let planRecordData = {
id: undefined,
- projectInfoId: this.planRecordData.id,
+ projectInfoId: this.projectInfoData.id,
planTimeFlag: 1
}
// 鍒ゆ柇瀛e害璁″垝鏄惁涓虹┖
- if (this.seasonRecords.length === 0){
+ if (this.seasonRecords.length === 0) {
planRecordData.id = 0;
- }else {
+ } else {
planRecordData.id = this.seasonRecords[this.seasonRecords.length - 1].id;
}
// 鏂板涓�琛岃褰�
@@ -172,13 +188,13 @@
handleAddYearPlan() {
let planRecordData = {
id: undefined,
- projectInfoId: this.planRecordData.id,
+ projectInfoId: this.projectInfoData.id,
planTimeFlag: 2
}
// 鍒ゆ柇骞村害璁″垝鏄惁涓虹┖
- if (this.yearRecords.length === 0){
+ if (this.yearRecords.length === 0) {
planRecordData.id = 0;
- }else {
+ } else {
planRecordData.id = this.yearRecords[this.yearRecords.length - 1].id;
}
// 鏂板涓�琛岃褰�
@@ -192,7 +208,7 @@
path: '/projectManage/planInfo',
query: {
data: row,
- planRecordData: this.planRecordData
+ projectInfoData: this.projectInfoData
}
})
},
@@ -204,17 +220,18 @@
},
// 鏌ョ湅椤圭洰璁″垝椤�
handleCheckPlanInfo(row) {
+ console.log(this.projectInfoData);
this.$router.push({
path: '/projectManage/planInfoCheck',
query: {
data: row,
- planRecordData: this.planRecordData
+ projectInfoData: this.projectInfoData
}
})
}
},
created() {
- this.getPlanInfoData();
+ this.getProjectInfoData();
},
};
</script>
diff --git a/src/views/projectManage/progress/index.vue b/src/views/projectManage/progress/index.vue
index dbc8f48..514064a 100644
--- a/src/views/projectManage/progress/index.vue
+++ b/src/views/projectManage/progress/index.vue
@@ -192,7 +192,7 @@
import { getList, getRecord, delRecord, addRecord, updateRecord } from "@/api/projectPlan/index";
export default {
- name: "index",
+ name: "Index",
data() {
return {
// 閬僵灞�
diff --git a/src/views/projectManage/progress/progressRecord.vue b/src/views/projectManage/progress/progressRecord.vue
index 3c2eafe..566a7e9 100644
--- a/src/views/projectManage/progress/progressRecord.vue
+++ b/src/views/projectManage/progress/progressRecord.vue
@@ -1,8 +1,8 @@
<template>
<div class="app-container">
<el-container>
- <el-header v-show="planRecordData && planRecordData.projectName" class="header-title">椤圭洰鍚嶇О锛歿{ planRecordData.projectName }}</el-header>
- <h4 v-show="planRecordData && planRecordData.projectCode" style="text-align: center">椤圭洰浠g爜锛歿{ planRecordData.projectCode }}</h4>
+ <el-header v-show="projectInfoData && projectInfoData.projectName" class="header-title">椤圭洰鍚嶇О锛歿{ projectInfoData.projectName }}</el-header>
+ <h4 v-show="projectInfoData && projectInfoData.projectCode" style="text-align: center">椤圭洰浠g爜锛歿{ projectInfoData.projectCode }}</h4>
<el-main>
<el-card shadow="hover">
<el-row :gutter="20">
@@ -97,35 +97,26 @@
</el-col>
<div style="margin-bottom: 10px">
<h1 style="font-size: 20px; font-weight: bold;">绔e伐鎶ュ憡</h1>
- <div style="display: flex; justify-content: center; align-items: center;">
- <el-upload
- class="upload-demo"
- drag
- action="https://jsonplaceholder.typicode.com/posts/"
- multiple>
- <i class="el-icon-upload"></i>
- <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
- <div class="el-upload__tip" slot="tip">鍙兘涓婁紶jpg/png鏂囦欢锛屼笖涓嶈秴杩�500kb</div>
- </el-upload>
+ <div style="display: flex;margin-left: 20px;">
+ <file-upload v-model="projectProgressForm.completedReportFileList"
+ :fileType="projectProgressForm.accept"
+ :isShowTip="false"/>
</div>
</div>
<div style="margin-bottom: 10px">
<h1 style="font-size: 20px; font-weight: bold;">鎯呭喌璇存槑</h1>
- <div style="display: flex; justify-content: center; align-items: center;">
- <el-upload
- class="upload-demo"
- drag
- action="https://jsonplaceholder.typicode.com/posts/"
- multiple>
- <i class="el-icon-upload"></i>
- <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
- <div class="el-upload__tip" slot="tip">鍙兘涓婁紶jpg/png鏂囦欢锛屼笖涓嶈秴杩�500kb</div>
- </el-upload>
+ <div style="display: flex;margin-left: 20px;">
+ <file-upload v-model="projectProgressForm.situationDescriptionFileList"
+ :fileType="projectProgressForm.accept"
+ :isShowTip="false"/>
</div>
+ </div>
+ <div style="display: flex; justify-content: center; align-items: center; margin-top: 20px;">
+ <el-button type="primary" @click="handleSave">淇� 瀛�</el-button>
</div>
</el-row>
- <el-dialog :title=" checkFlag ? '杩涘害鏌ョ湅' : '杩涘害涓婃姤' " :visible.sync="dialogFormVisible" custom-class="custom-dialog">
+ <el-dialog :title=" checkFlag ? '杩涘害鏌ョ湅' : '杩涘害涓婃姤' " :visible.sync="dialogFormVisible" custom-class="custom-dialog" :close-on-click-modal="false" @close="handleCancel">
<el-form :model="progressReportData">
<el-form-item label="鎶ュ憡鏈燂細" :label-width="formLabelWidth">
<el-input :value="progressReportData.planTime + (progressReportData.planTimeFlag === 0 ? '鏈堝害' : progressReportData.planTimeFlag === 1 ? '瀛e害' : '骞村害')" readonly />
@@ -146,17 +137,10 @@
<el-form-item label="杩涘害鎯呭喌锛�" :label-width="formLabelWidth">
<el-input type="textarea" v-model="progressReportData.progressStatus" placeholder="璇疯緭鍏�" rows="3" :readonly="checkFlag" />
</el-form-item>
- <el-form-item label="宸ョ▼杩涘害闄勪欢锛�" :label-width="formLabelWidth">
- <el-upload
- class="upload-demo"
- drag
- action="https://jsonplaceholder.typicode.com/posts/"
- multiple
- :disabled="checkFlag" >
- <i class="el-icon-upload"></i>
- <div class="el-upload__text">灏嗘枃浠舵嫋鍒版澶勶紝鎴�<em>鐐瑰嚮涓婁紶</em></div>
- <div class="el-upload__tip" slot="tip">鍙兘涓婁紶jpg/png鏂囦欢锛屼笖涓嶈秴杩�500kb</div>
- </el-upload>
+ <el-form-item prop="fileList" label="宸ョ▼杩涘害闄勪欢锛�" :label-width="formLabelWidth">
+ <file-upload v-model="progressReportData.fileList"
+ :fileType="accept"
+ :isShowTip="false"/>
</el-form-item>
<el-form-item label="鎴鏈姤鍛婂畬鎴愭姇璧勶細" :label-width="formLabelWidth">
<el-input v-model="progressReportData.actualInvest" type="number" :readonly="checkFlag" />
@@ -182,7 +166,7 @@
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="handleRecordSubmit" v-if="!checkFlag">涓� 鎶�</el-button>
- <el-button @click="dialogFormVisible = false">鍙� 娑�</el-button>
+ <el-button @click="handleCancel">鍙� 娑�</el-button>
</div>
</el-dialog>
</el-card>
@@ -192,14 +176,20 @@
</template>
<script>
-import { getProgressInfoList, getProgressReport, recordSubmit } from "@/api/projectManage/progress/index";
+import { getProgressInfoList, getProgressReport, recordSubmit, saveProjectProgressFileLists, getProjectProgressForm } from "@/api/projectManage/progress/index";
+import progressRecord from "./progressRecord.vue";
export default {
- name: "progressRecord",
+ name: "ProgressRecord",
+ computed: {
+ progressRecord() {
+ return progressRecord
+ }
+ },
data() {
return {
// 鎺ユ敹浼犻�掕繃鏉ョ殑椤圭洰璁″垝鏁版嵁
- planRecordData: {},
+ projectInfoData: {},
monthProgress: [],
seasonProgress: [],
yearProgress: [],
@@ -209,20 +199,37 @@
// 鏌ョ湅鏄剧ず
checkFlag: false,
progressReportData: {},
- formLabelWidth: '150px'
+ formLabelWidth: '150px',
+
+ // 绔e伐鎶ュ憡銆佹儏鍐佃鏄庨檮浠�
+ projectProgressForm: {
+ completedReportFileList: [],
+ situationDescriptionFileList: [],
+ projectReportId: null,
+ accept: ['pdf'],
+ },
+
+ // 杩涘害涓婃姤闄勪欢绫诲瀷
+ accept: ['pdf','jpg','mp4'],
}
},
methods: {
search() {
- this.getPlanRecordData()
+ this.getProjectInfoData()
+ this.getProjectProgressForm(this.projectInfoData.id);
},
// 鑾峰彇浼犻�掕繃鏉ョ殑椤圭洰璁″垝璇︽儏
- getPlanRecordData() {
+ getProjectInfoData() {
// 浠庢煡璇㈠弬鏁颁腑鑾峰彇鏁版嵁
if (this.$route.query.data) {
- this.planRecordData = JSON.parse(this.$route.query.data);
- this.getProgressInfoList(this.planRecordData.id);
+ this.projectInfoData = JSON.parse(this.$route.query.data);
+ this.getProgressInfoList(this.projectInfoData.id);
}
+ },
+ getProjectProgressForm(id) {
+ getProjectProgressForm(id).then(res => {
+ this.projectProgressForm = res.data;
+ })
},
// 鑾峰彇椤圭洰杩涘害璁″垝椤�
getProgressInfoList(id) {
@@ -254,6 +261,20 @@
getProgressReport(row.id).then(res => {
this.progressReportData = res.data;
})
+ },
+ // 鍏抽棴寮圭獥
+ handleCancel() {
+ this.dialogFormVisible = false;
+ this.checkFlag = false;
+ },
+ // 淇濆瓨
+ handleSave() {
+ this.projectProgressForm.projectReportId = this.projectInfoData.id;
+ // 鍒ゆ柇鏂囦欢涓嶄负绌�
+ saveProjectProgressFileLists(this.projectProgressForm).then(res => {
+ this.$message.success('淇濆瓨鎴愬姛');
+ this.search();
+ })
}
},
created() {
--
Gitblit v1.8.0