diff --git a/.env.production b/.env.production
index 5b359d5..2939194 100644
--- a/.env.production
+++ b/.env.production
@@ -4,4 +4,4 @@ ENV = 'production'
# base api
VUE_APP_BASE_API = http://192.168.60.99:9001/
-#VUE_APP_BASE_API = 'http://safety.115.langye.net/'
\ No newline at end of file
+#VUE_APP_BASE_API = 'http://safety.115.langye.net/'
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue
index 6493d47..c9f3cb6 100644
--- a/src/views/dashboard/index.vue
+++ b/src/views/dashboard/index.vue
@@ -47,7 +47,8 @@
-
+
@@ -56,9 +57,107 @@
style="margin-right:5px;margin-bottom:5px;"
@click="openMyMission(item.value,scope.row)">{{item.remark}}
-->
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -221,7 +320,7 @@
-
+
@@ -262,7 +361,8 @@ import addPatrol from '@/views/task/list/components/addPatrol.vue'
import answerQuestion from '@/views/task/list/components/answerQuestion.vue'
import showPlan from '@/views/task/list/components/showPlan.vue'
import showArticle from '@/views/dashboard/components/showArticle.vue'
- import state from '@/store/modules/user.js'
+import state from '@/store/modules/user.js'
+import addUnit from '@/views/task/list/components/addUnit.vue'
export default {
name: 'Dashboard',
computed: {
@@ -278,7 +378,8 @@ export default {
addPatrol,
answerQuestion,
showArticle,
- showPlan
+ showPlan,
+ addUnit,
},
data() {
return {
@@ -358,8 +459,14 @@ export default {
id:3,
value:'待归档',
type:'danger'
- }],
- myselfTable: [{
+ }],
+ treeProps:{children: 'mychildren', hasChildren: 'hasChildren'},
+ myselfTable: [{
+ label: "",
+ prop: 'pindex',
+ // fixed:'left',
+ width:80
+ },{
label: "任务名称",
prop: 'name',
width: 200,
@@ -398,12 +505,14 @@ export default {
})
} )
}
- }, {
- label: "责任人(科室)",
- prop: 'main_admin.name',
- width: 120,
- align: 'center',
- }],
+ },
+ // {
+ // label: "责任人(科室)",
+ // prop: 'main_admin.name',
+ // width: 120,
+ // align: 'center',
+ // },
+ ],
depYear:'',
depList:[],
auditTable:{
@@ -1079,10 +1188,14 @@ export default {
async getMyselfList() {
const res = await listunit({
page: 1,
- page_size: 99,
+ page_size: 999,
myself: 1,
audit_status: '',
- pid:''
+ pid:'',
+ sort_name: 'start_date',
+ sort_type: 'DESC',
+ year: new Date().getFullYear(),
+ month: '',
})
// 我的任务中 选择accept_department_ids部门的,只有选择到的科室负责人能看到 is_manger = true
// 且具体执行人为空
@@ -1090,7 +1203,7 @@ export default {
let _arr = []
res.data.map((r,index)=>{
let doAdmins = r.do_admin_ids ? r.do_admin_ids : []
- if(this.path_type == 5 && r.accept_department_ids.length > 0){
+ if(r.accept_department_ids.length > 0){
let isDepartment = r.accept_department_ids.indexOf(this.stateObj.department_id)!=-1 ? true : false
let isDomains = doAdmins.indexOf(this.stateObj.login_id)!=-1 ? true : false
if(doAdmins.length==0){
@@ -1103,16 +1216,50 @@ export default {
}
}
}
- })
- const newArr = res.data.filter((_, index) => !spliceIndex.includes(index));
-
- this.myselfList = newArr
+ })
+ const newArr = res.data.filter((_, index) => !spliceIndex.includes(index));
+ _arr = this.buildTree(newArr)
+ _arr.map((r,index)=>{
+ r.pindex = index+1
+ })
+ this.myselfList = _arr
this.myselfTotal = res.total
// this.activeCount = parseInt(this.activeList.length/6)==1?1:parseInt(this.activeList.length/6)+1
// this.autoScroll()
+ },
+ buildTree(items) {
+ const tree = [];
+ const map = {};
+
+ items.forEach(item => {
+ map[item.id] = item;
+ });
+
+ items.forEach(item => {
+ const parent = map[item.pid];
+ if (parent) {
+ (parent.mychildren || (parent.mychildren = [])).push(item);
+ } else {
+ tree.push(item);
+ }
+ });
+
+ return tree;
+ },
+ editorUnit(id, type , formtype) {
+ if (id) {
+ this.$refs.addUnit.id = id
+ }
+ if(formtype){
+ this.$refs.addUnit.setType(4)
+ }
+
+ this.$refs.addUnit.type = type
+ this.$refs.addUnit.unitTypeList = this.unitTypeList
+ this.$refs.addUnit.department_id = this.stateObj.department_id
+ this.$refs.addUnit.isShow = true
},
-
openMyMission(remark, e) {
switch (remark) {
case '检查':
diff --git a/src/views/task/list/components/addPlan.vue b/src/views/task/list/components/addPlan.vue
index bf64550..295f21c 100644
--- a/src/views/task/list/components/addPlan.vue
+++ b/src/views/task/list/components/addPlan.vue
@@ -21,20 +21,6 @@
-
-
-
- 附件:
-
-
-
- 点击上传
-
-
-
-
-
+
+
+
+ 附件:
+
+
+
+ 点击上传
+
+
+
+
@@ -94,7 +93,7 @@
-
+
diff --git a/src/views/task/list/unit.vue b/src/views/task/list/unit.vue
index 286f3c7..4e99be6 100644
--- a/src/views/task/list/unit.vue
+++ b/src/views/task/list/unit.vue
@@ -97,9 +97,9 @@
-
+
- 0 )
|| scope.row.main_admin_id==stateObj.login_id">
-
+