From 39cdec856c6645616ca21d786ad513b55ba2e720 Mon Sep 17 00:00:00 2001 From: lion <120344285@qq.com> Date: Thu, 29 Aug 2024 15:51:42 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E4=BB=BB=E5=8A=A1=E5=8F=91?= =?UTF-8?q?=E9=80=81=E4=BF=A1=E6=81=AF=E5=A4=A7=E5=B9=B3=E5=8F=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/permission.js | 2 +- src/views/dashboard/index.vue | 22 +++++------ src/views/task/list/components/addUnit.vue | 38 ++++++++++++++----- src/views/task/list/components/sendNotice.vue | 2 +- src/views/task/list/plan.vue | 18 ++++++++- vue.config.js | 2 +- 6 files changed, 59 insertions(+), 25 deletions(-) diff --git a/src/permission.js b/src/permission.js index 721588b..7e4416e 100644 --- a/src/permission.js +++ b/src/permission.js @@ -14,7 +14,7 @@ NProgress.configure({ showSpinner: false }) // NProgress Configuration -const whiteList = ['/login','/task/list/unit_5'] // no redirect whitelist +const whiteList = ['/login'] // no redirect whitelist router.beforeEach(async (to, from, next) => { // start progress bar diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index 2637261..77eaf7d 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -89,21 +89,17 @@
- @@ -338,7 +334,7 @@ export default { lawList:[], filesList:[], planStatus:["未完成","发起了一项","开展了一项","完成了一项"], - missionStatus:['',"开展了一项","未完成","完成了一项任务","发起了一项"], + missionStatus:['完成',"开展了一项","未完成","完成了一项任务","发起了一项"], activeAllObj:{ inspection_id:"检查", mission_plan_id:"年度计划任务", @@ -918,7 +914,9 @@ export default { }, methods: { - + goMyunit(){ + this.$router.push('/task/list/unit_5') + }, showActiveInfo(item){ console.log(item) if(item.is_id==='mission'){ diff --git a/src/views/task/list/components/addUnit.vue b/src/views/task/list/components/addUnit.vue index 34bd23d..f8f6287 100644 --- a/src/views/task/list/components/addUnit.vue +++ b/src/views/task/list/components/addUnit.vue @@ -166,7 +166,7 @@ 部门 小组 --> 小组 - 人员 + 人员 部门
@@ -384,7 +384,7 @@ - + @@ -427,13 +427,15 @@ import { listregulation } from "@/api/lawsfile/regulation.js"; - import state from '@/store/modules/user.js' + import state from '@/store/modules/user.js' + import sendNotice from './sendNotice.vue' // import mixins from '../mixins/mixins.js'; export default { // mixins:[mixins], components: { addQuestion, - elSelectTree + elSelectTree, + sendNotice }, data() { return { @@ -888,7 +890,11 @@ this.checkAll = checkedCount === this.deptOptions.length; this.isIndeterminate = checkedCount > 0 && checkedCount < this.deptOptions.length; }, - + // 新增之后发送到 大平台 + sendNotice(row){ + this.$refs.sendNotice.setForm(row) + this.$refs.sendNotice.isShow = true + }, async getDetail() { const res = await get(this.id) this.form = { @@ -1129,7 +1135,10 @@ if(!(this.form.audit_status==3||this.form.audit_status==5)){ console.log("this.betweenSe",this.form.start_date, this.form.end_date) this.betweenSe(this.form.start_date, this.form.end_date) - } + } + console.log("this.form",this.form) + // return + // 新增的时候要调用 发送到大平台的接口 if (this.type === 'add' || this.type=== 'pid') { this.form.do_admin_ids = [] save({ @@ -1139,14 +1148,25 @@ type: 'success', message: '新增任务成功' }) - + console.log("") saveLog({ table_name:"missions_logs", mission_name:this.form.name, - mission_id:this.form.pid>0?this.form.pid:res.id, + mission_id:this.form.pid>0?this.form.pid:res.model.id, op_name:this.type === 'add'?'新增任务':(this.type=== 'pid'?'任务分解':'新增任务'), remark:'' - }).then(res=>{ + }).then(res1=>{ + if(this.plan_unit==='plan_unit'){ + + }else{ + if(res.mission_distribute && res.mission_distribute.length>0){ + this.sendNotice({ + id:res.model.id, + mission_distribute:res.mission_distribute + }) + } + } + this.isShow = false this.$emit('refresh') this.$emit('toUnit', this.form.type) diff --git a/src/views/task/list/components/sendNotice.vue b/src/views/task/list/components/sendNotice.vue index 56eb046..8d11d5d 100644 --- a/src/views/task/list/components/sendNotice.vue +++ b/src/views/task/list/components/sendNotice.vue @@ -58,7 +58,7 @@ checkArr:[], formObj: {}, form: { - title:'', + title:'您有一条安全生产任务需要办理', users:[] }, rules: { diff --git a/src/views/task/list/plan.vue b/src/views/task/list/plan.vue index 5612a5a..3c31d4e 100644 --- a/src/views/task/list/plan.vue +++ b/src/views/task/list/plan.vue @@ -24,7 +24,19 @@
+ :table-item="table"> +