From 5644fcb36d0d1b683c656176c8aff87a4260681e Mon Sep 17 00:00:00 2001
From: lion <120344285@qq.com>
Date: Fri, 12 Jul 2024 11:38:09 +0800
Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=A3=80=E6=9F=A5=E5=A2=9E?=
=?UTF-8?q?=E5=8A=A0=E5=AD=97=E6=AE=B5?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/dashboard/index.vue | 6 +-
src/views/task/list/components/addPatrol.vue | 165 +++++++++++++++----
src/views/task/list/components/addUnit.vue | 2 +-
src/views/task/list/components/checkUnit.vue | 94 +++++++++--
src/views/task/list/unit.vue | 8 +-
5 files changed, 224 insertions(+), 51 deletions(-)
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index d5bfc92..45fb353 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -595,9 +595,9 @@ export default {
customFn: (row) => {
return (
{
// 有转办人,转办人不显示 已转办 任务为结束。
- row.do_admin_ids.length>0 && !row.do_admin_ids.includes(this.stateObj.login_id) && !(row.audit_status==3||row.audit_status==5)?
-
已转办
- :
+ // row.do_admin_ids.length>0 && !row.do_admin_ids.includes(this.stateObj.login_id) && !(row.audit_status==3||row.audit_status==5)?
+ //
已转办
+ // :
this.auditStatusList.map(item => {
if (item.id == row.audit_status) {
return (
+ :rules="type==='add'?{}:rules" @submit="submit">
-
+
*发现时间:
@@ -71,8 +71,8 @@
-
-
*问题详情
+
+
@@ -87,6 +87,9 @@
+
+
+
@@ -243,7 +246,17 @@
mapform: [],
patrol_table:[
{
- label:'问题描述',
+ label:'*发现时间',
+ prop:'date',
+ width:180,
+ customFn:(row,scope)=>{
+ return(
+ )
+ }
+ },
+ {
+ label:'*问题描述',
prop:'ask_introduce',
width:180,
customFn:(row,scope)=>{
@@ -252,7 +265,7 @@
)
}
},{
- label:'问题类型',
+ label:'*问题类型',
prop:'ask_id',
width:180,
customFn:(row,scope)=>{
@@ -281,7 +294,7 @@
},
{
- label:'检查地点',
+ label:'*检查地点',
prop:'siteName',
width:240,
customFn:(row,scope)=>{
@@ -367,6 +380,7 @@
mapClickIndex:0,
patrol_list:[{
showCasc:true,
+ date:'',
ask_id:'',
site_id: '',
siteName: '',
@@ -412,18 +426,18 @@
required: true,
message: '请选择发现时间'
}],
- // siteName: [{
- // required: true,
- // message: '请选择检查地点'
- // }],
- // ask_id: [{
- // required: true,
- // message: '请选择问题类型'
- // }],
- // ask_introduce: [{
- // required: true,
- // message: '请输入问题描述'
- // }]
+ address: [{
+ required: true,
+ message: '请选择检查地点'
+ }],
+ ask_id: [{
+ required: true,
+ message: '请选择问题类型'
+ }],
+ ask_introduce: [{
+ required: true,
+ message: '请输入问题描述'
+ }]
}
}
},
@@ -598,6 +612,7 @@
addPatrolList(){
this.patrol_list.push({
showCasc:true,
+ date:'',
ask_id:'',
site_id: '',
siteName: '',
@@ -702,23 +717,93 @@
this.$refs.cascader1.computePresentText()
// res.guide_upload ? this.guidePictureList.push(res.guide_upload) : ''
},
- submit() {
- console.log("this.patrol_list",this.patrol_list)
- // return
- let _files = []
- if (this.pictureList.length > 0) {
- for (var h of this.pictureList) {
- if (h.response) {
- _files.push(h.response.id)
- } else {
- _files.push(h.id)
- }
+ deepCopy(data){
+ //string,number,bool,null,undefined,symbol
+ //object,array,date
+ if (data && typeof data === "object") {
+ //针对函数的拷贝
+ if (typeof data === "function") {
+ let tempFunc = data.bind(null);
+ tempFunc.prototype = this.deepCopy(data.prototype);
+ return tempFunc;
+ }
+
+ switch (Object.prototype.toString.call(data)) {
+ case "[object String]":
+ return data.toString();
+ case "[object Number]":
+ return Number(data.toString());
+ case "[object Boolean]":
+ return new Boolean(data.toString());
+ case "[object Date]":
+ return new Date(data.getTime());
+ case "[object Array]":
+ let arr = [];
+ for (let i = 0; i < data.length; i++) {
+ arr[i] = this.deepCopy(data[i]);
+ }
+ return arr;
+
+ //js自带对象或用户自定义类实例
+ case "[object Object]":
+ let obj = {};
+ for (let key in data) {
+ //会遍历原型链上的属性方法,可以用hasOwnProperty来控制 (obj.hasOwnProperty(prop)
+ obj[key] = this.deepCopy(data[key]);
+ }
+ return obj;
}
- this.form.file_ids = _files
} else {
- this.form.file_ids = []
+ //string,number,bool,null,undefined,symbol
+ return data;
}
+ },
+ copyAsk(index){
+ console.log(index)
+ let obj = this.deepCopy(this.patrol_list[index])
+ obj.pictureList=[]
+ obj.file_ids=[]
+ this.patrol_list.push(obj)
+ },
+ submit() {
+ console.log("this.patrol_list",this.patrol_list)
+
+
if (this.type === 'add') {
+ if(this.patrol_list.length<1){
+ Message({
+ type: 'warning',
+ message: '请填写问题'
+ })
+ return
+ }
+ let nullCount = 0
+ this.patrol_list.map(item=>{
+ if(!item.date){
+ nullCount++
+ return
+ }
+ if(!item.ask_introduce){
+ nullCount++
+ return
+ }
+ if(!item.ask_id){
+ nullCount++
+ return
+ }
+ if(!item.siteName){
+ nullCount++
+ return
+ }
+ })
+ if( nullCount>0){
+ Message({
+ type: 'warning',
+ message: '请填写完整信息'
+ })
+ return
+ }
+
this.patrol_list.map(item=>{
let _files = []
item.pictureList.map(p=>{
@@ -732,7 +817,7 @@
})
let baseForm = {
mission_id:this.form.mission_id,
- date:this.form.date,
+ // date:this.form.date,
up_admin_id:this.form.up_admin_id,
batch:this.patrol_list,
// site_id: this.form.site_id,
@@ -755,6 +840,20 @@
return
}
if (this.type === 'editor') {
+ // return
+ let _files = []
+ if (this.pictureList.length > 0) {
+ for (var h of this.pictureList) {
+ if (h.response) {
+ _files.push(h.response.id)
+ } else {
+ _files.push(h.id)
+ }
+ }
+ this.form.file_ids = _files
+ } else {
+ this.form.file_ids = []
+ }
save({
id: this.id,
...this.form
diff --git a/src/views/task/list/components/addUnit.vue b/src/views/task/list/components/addUnit.vue
index ae057ed..9c4ac86 100644
--- a/src/views/task/list/components/addUnit.vue
+++ b/src/views/task/list/components/addUnit.vue
@@ -249,7 +249,7 @@
- 小组:{{scope.row.name=mission_groups_name[scope.$index]}}
+ {{scope.row.name=mission_groups_name[scope.$index]}}
diff --git a/src/views/task/list/components/checkUnit.vue b/src/views/task/list/components/checkUnit.vue
index 244f456..5ad3bce 100644
--- a/src/views/task/list/components/checkUnit.vue
+++ b/src/views/task/list/components/checkUnit.vue
@@ -175,23 +175,26 @@
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -601,6 +629,48 @@
value: '已完成',
type: 'danger'
}],
+ doList:[{
+ name:'处长室',
+ date:'2024-07-11',
+ status:'已完成',
+ opr:'任务执行'
+ },{
+ name:'综合管理科',
+ date:'',
+ status:'未完成',
+ opr:''
+ },{
+ name:'应急保障科',
+ date:'2024-07-11',
+ status:'已完成',
+ opr:'任务分解'
+ },{
+ name:'河道管理科',
+ date:'2024-07-11',
+ status:'已完成',
+ opr:'任务转办给管理员'
+ }],
+ doTable:[{
+ label: "参与对象",
+ prop: 'name',
+ width: 180,
+ align: 'left',
+ },{
+ label: "完成时间",
+ prop: 'date',
+ width: 180,
+ align: 'left',
+ },{
+ label: "完成状态",
+ prop: 'status',
+ width: 180,
+ align: 'left',
+ },{
+ label: "执行方式",
+ prop: 'opr',
+ // width: 180,
+ align: 'left',
+ }],
pidTable:[
{
label: "任务名称",
@@ -1567,8 +1637,12 @@
this.type = ''
this.pid_list = []
this.send_list = []
+ this.myself_list = []
this.pid_id = ''
- this.send_id = ''
+ this.send_id = ''
+ this.now_id=''
+ this.myself_id=''
+ this.pidLog = []
this.pictureList = []
this.my_uploads_list = []
this.uploadsForm = {}
diff --git a/src/views/task/list/unit.vue b/src/views/task/list/unit.vue
index 554c2bc..c862168 100644
--- a/src/views/task/list/unit.vue
+++ b/src/views/task/list/unit.vue
@@ -21,7 +21,7 @@
-
@@ -501,9 +501,9 @@
customFn: (row) => {
return ( {
// 有转办人,转办人不显示 已转办 任务为结束。
- row.do_admin_ids.length>0 && !row.do_admin_ids.includes(this.stateObj.login_id) && !(row.audit_status==3||row.audit_status==5)?
- 已转办
- :
+ // row.do_admin_ids.length>0 && !row.do_admin_ids.includes(this.stateObj.login_id) && !(row.audit_status==3||row.audit_status==5)?
+ // 已转办
+ // :
this.auditStatusList.map(item => {
if (item.id == row.audit_status) {
return (