From d47e39850ddc99d725df02fa760a68e052c9070e Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Thu, 20 Jun 2024 16:25:45 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/XyDialog/index.vue | 20 +++--
src/views/task/list/components/addPlan.vue | 70 ++++++++++-----
src/views/task/list/components/addUnit.vue | 20 +++--
src/views/task/list/plan.vue | 53 ++++++++++--
src/views/task/list/unit.vue | 99 ++++++++++++++++------
5 files changed, 195 insertions(+), 67 deletions(-)
diff --git a/src/components/XyDialog/index.vue b/src/components/XyDialog/index.vue
index 071bd82..18ea912 100644
--- a/src/components/XyDialog/index.vue
+++ b/src/components/XyDialog/index.vue
@@ -26,6 +26,10 @@ export default {
type:String,
default: ''
},
+ subtitle:{
+ type:String,
+ default: ''
+ },
form:{
type:Object,
default:()=>{
@@ -51,13 +55,15 @@ export default {
//
headerRender(){
- return (
-
- )
+ return (
+
+ {this.title}
{this.subtitle}
+
+
+
+ )
+
+
},
footerRender(){
if(this.type === 'form'){
diff --git a/src/views/task/list/components/addPlan.vue b/src/views/task/list/components/addPlan.vue
index bf1027f..bf64550 100644
--- a/src/views/task/list/components/addPlan.vue
+++ b/src/views/task/list/components/addPlan.vue
@@ -1,9 +1,16 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -41,7 +48,7 @@
-
+
@@ -82,11 +89,15 @@
-
-
+
+
+
+
+
+
-
+
@@ -125,7 +136,8 @@
data() {
return {
isShow: false,
- type: 'add',
+ type: 'add',
+ typeName:'',
id: '',
department_id: '',
uploadOther: {
@@ -154,8 +166,11 @@
out_line_id: '',
out_line_content: '',
year: '',
- status: 2,
- },
+ status: 2,
+ audit_status:0,
+ audits:''
+ },
+ audit_status_before:'',
monthsArr: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
rules: {
name: [{
@@ -292,7 +307,9 @@
content: res?.content,
start_date: res.start_date ? res.start_date : [],
main_department_id: res?.main_department_id,
- main_admin_id: res?.main_admin_id
+ main_admin_id: res?.main_admin_id,
+ audit_status:res.audit_status?res.audit_status:0,
+ audits:''
}
for (var f of res.files) {
this.pictureList.push({
@@ -314,7 +331,14 @@
})
}
},
- clickSubmit() {
+ clickSubmit(opr) {
+ if(opr==='save'){
+ this.form.audit_status = 2
+ }else if(opr==='confirm'){
+ this.form.audit_status = 0
+ }else{
+ this.form.audit_status = 0
+ }
this.$refs.dialog.submit()
},
submit() {
@@ -332,7 +356,10 @@
this.form.file_ids = []
}
// this.$refs.dialog.submit()
- // return
+ // return
+ if(this.type==='audit'){
+ this.form.audit_status=this.audit_status_before
+ }
console.log("form", this.form)
// return
if (this.type === 'add') {
@@ -348,14 +375,14 @@
})
return
}
- if (this.type === 'editor') {
+ if (this.type === 'editor' || this.type==='audit') {
save({
id: this.id,
...this.form
}).then(res => {
Message({
type: 'success',
- message: '编辑计划成功'
+ message: this.type === 'editor'?'编辑计划成功':'审核成功'
})
this.isShow = false
this.$emit('refresh')
@@ -379,17 +406,20 @@
},
watch: {
isShow(newVal) {
- if (newVal) {
- if (this.type === 'editor') {
+ if (newVal) {
+ if (this.type === 'editor' || this.type === 'audit') {
+ this.typeName = this.type === 'editor' ? '编辑计划' :'审核'
this.getDetail()
}
if (this.type === 'add') {
- var date = new Date()
+ var date = new Date()
+ this.typeName = '发起计划'
this.form.year = date.getFullYear() + ''
}
} else {
this.id = ''
- this.pictureList = []
+ this.pictureList = []
+ this.audit_status_before = ''
this.checkAllMonth = false
this.isIndeterminateMonth = true
this.$refs['dialog'].reset()
diff --git a/src/views/task/list/components/addUnit.vue b/src/views/task/list/components/addUnit.vue
index 839df55..4314f29 100644
--- a/src/views/task/list/components/addUnit.vue
+++ b/src/views/task/list/components/addUnit.vue
@@ -1,6 +1,6 @@
-
-
+
-
-
-
-
-
+ ">
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-