diff --git a/resources/assets/js/pages/manage/components/Report.vue b/resources/assets/js/pages/manage/components/Report.vue
index 05d442c3..74404303 100644
--- a/resources/assets/js/pages/manage/components/Report.vue
+++ b/resources/assets/js/pages/manage/components/Report.vue
@@ -38,6 +38,7 @@ export default {
DrawerOverlay,
ReportEdit, ReportMy, ReportReceive, ReportDetail
},
+
props: {
reportUnreadNumber: {
type: Number,
@@ -47,6 +48,7 @@ export default {
default: "my"
}
},
+
data() {
return {
reportTabs: "my",
@@ -56,20 +58,27 @@ export default {
reportId: 0
}
},
+
mounted() {
this.reportTabs = this.reportType;
},
+
methods: {
- tabRebder(data) {
+ tabRebder(num) {
return h => {
- if (data > 0) {
+ if (num > 0) {
return h('div', [
h('span', {class: 'navbar-item-content'}, this.$L('收到的汇报')),
- h('Badge', {class: 'manage-box-report'}, data),
+ h('Badge', {
+ class: 'manage-box-report',
+ props: {
+ count: num
+ }
+ }),
])
} else {
return h('div', [
- h('span', {class: 'navbar-item-content'}, this.$L('收到的汇报')),
+ h('span', {class: 'navbar-item-content'}, this.$L('收到的汇报')),
])
}
}
@@ -83,10 +92,12 @@ export default {
this.$emit("read");
}, 1500);
},
+
editReport(id) {
this.reportId = id;
this.showEditDrawer = true;
},
+
saveSuccess() {
this.reportId = 0;
this.reportTabs = "my";
diff --git a/resources/assets/js/pages/manage/components/ReportDetail.vue b/resources/assets/js/pages/manage/components/ReportDetail.vue
index e724a2c7..b13c6a57 100644
--- a/resources/assets/js/pages/manage/components/ReportDetail.vue
+++ b/resources/assets/js/pages/manage/components/ReportDetail.vue
@@ -1,12 +1,13 @@
-
{{ data.title }}
-
+
@@ -14,7 +15,9 @@
-
+
@@ -22,26 +25,28 @@
-
+
-
+
-
+
-
-
+
-
@@ -55,7 +60,6 @@ export default {
},
mounted() {
if (this.data.id > 0) this.sendRead();
- // console.log(this.data)
},
watch: {
data() {
diff --git a/resources/assets/js/pages/manage/components/ReportEdit.vue b/resources/assets/js/pages/manage/components/ReportEdit.vue
index 4c1e99cc..3f089daa 100644
--- a/resources/assets/js/pages/manage/components/ReportEdit.vue
+++ b/resources/assets/js/pages/manage/components/ReportEdit.vue
@@ -1,7 +1,9 @@
@@ -109,6 +117,7 @@ export default {
this.prevCycleText = this.$L("上一周");
this.nextCycleText = this.$L("下一周");
},
+
handleSubmit: function () {
let id = this.reportData.id;
if (this.id === 0 && id > 1) {
@@ -116,6 +125,7 @@ export default {
title: '覆盖提交',
content: '是否覆盖提交',
loading: true,
+ zIndex: 2000,
onOk: () => {
this.doSubmit();
}
@@ -125,6 +135,7 @@ export default {
}
},
+
doSubmit() {
this.$store.dispatch("call", {
url: 'report/store',
@@ -144,6 +155,7 @@ export default {
$A.messageError(msg);
});
},
+
getTemplate() {
this.$store.dispatch("call", {
url: 'report/template',
@@ -166,6 +178,7 @@ export default {
$A.messageError(msg);
});
},
+
typeChange(value) {
// 切换汇报类型后偏移量归零
this.reportData.offset = 0;
@@ -180,6 +193,7 @@ export default {
if (this.id <= 0)
this.getTemplate();
},
+
getDetail(reportId) {
this.userInputShow = false;
this.$store.dispatch("call", {
@@ -204,12 +218,14 @@ export default {
this.userInputShow = true;
});
},
+
prevCycle() {
this.reportData.offset -= 1;
this.disabledType = false;
this.reReportData();
this.getTemplate();
},
+
nextCycle() {
// 周期偏移量不允许大于0
if ( this.reportData.offset < 0 ) {
@@ -219,6 +235,7 @@ export default {
this.reReportData();
this.getTemplate();
},
+
// 获取上一次接收人
getLastSubmitter() {
this.userInputShow = false;
@@ -236,6 +253,7 @@ export default {
this.userInputShow = true;
});
},
+
reReportData() {
this.reportData.title = "";
this.reportData.content = "";
diff --git a/resources/assets/js/pages/manage/components/ReportMy.vue b/resources/assets/js/pages/manage/components/ReportMy.vue
index 638c42dc..4ad4b762 100644
--- a/resources/assets/js/pages/manage/components/ReportMy.vue
+++ b/resources/assets/js/pages/manage/components/ReportMy.vue
@@ -1,39 +1,71 @@
-
-
-
+
+
+
+ -
+
+ {{ $L("汇报类型") }}
+
+
+
+
+
+ -
+
+ {{ $L("汇报时间") }}
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -50,12 +82,8 @@ export default {
listPageSize: 10,
noDataText: "",
createAt: [],
- reportType:'',
- reportTypeList:[
- {value:"",label:'全部' },
- {value:"weekly",label:'周报' },
- {value:"daily",label:'日报' },
- ],
+ reportType: '',
+ reportTypeList: [],
}
},
mounted() {
@@ -65,37 +93,37 @@ export default {
initLanguage() {
this.noDataText = this.noDataText || "数据加载中.....";
this.columns = [{
- "title": this.$L("名称"),
- "key": 'title',
- "sortable": true,
- "minWidth": 120,
+ title: this.$L("名称"),
+ key: 'title',
+ sortable: true,
+ minWidth: 120,
}, {
- "title": this.$L("类型"),
- "key": 'type',
- "align": 'center',
- "sortable": true,
- "maxWidth": 80,
+ title: this.$L("类型"),
+ key: 'type',
+ align: 'center',
+ sortable: true,
+ maxWidth: 80,
}, {
- "title": this.$L("汇报时间"),
- "key": 'created_at',
- "align": 'center',
- "sortable": true,
- "maxWidth": 180,
+ title: this.$L("汇报时间"),
+ key: 'created_at',
+ align: 'center',
+ sortable: true,
+ maxWidth: 180,
}, {
- "title": "操作",
- "key": 'action',
- "align": 'right',
- "width": 80,
+ title: this.$L("操作"),
+ align: 'center',
+ width: 100,
+ minWidth: 100,
render: (h, params) => {
if (!params.row.id) {
return null;
}
- let arr = [
+ const vNodes = [
h('ETooltip', {
- props: { content: this.$L('编辑'), transfer: true, delay: 600 }
+ props: {content: this.$L('编辑'), transfer: true, delay: 600}
}, [h('Icon', {
- props: { type: 'md-create', size: 16 },
- style: { margin: '0 3px', cursor: 'pointer' },
+ props: {type: 'md-create', size: 16},
+ style: {margin: '0 3px', cursor: 'pointer'},
on: {
click: () => {
this.$emit("edit", params.row.id);
@@ -103,11 +131,11 @@ export default {
}
})]),
h('ETooltip', {
- props: { content: this.$L('查看'), transfer: true, delay: 600 },
- style: { position: 'relative' },
+ props: {content: this.$L('查看'), transfer: true, delay: 600},
+ style: {position: 'relative', marginLeft: '6px'},
}, [h('Icon', {
- props: { type: 'md-eye', size: 16 },
- style: { margin: '0 3px', cursor: 'pointer' },
+ props: {type: 'md-eye', size: 16},
+ style: {margin: '0 3px', cursor: 'pointer'},
on: {
click: () => {
this.$emit("detail", params.row);
@@ -115,10 +143,20 @@ export default {
}
})]),
];
- return h('div', arr);
+ return h('TableAction', {
+ props: {
+ column: params.column
+ }
+ }, vNodes);
},
}];
+ this.reportTypeList = [
+ {value: "", label: this.$L('全部')},
+ {value: "weekly", label: this.$L('周报')},
+ {value: "daily", label: this.$L('日报')},
+ ]
},
+
getLists() {
this.loadIng = 1;
this.$store.dispatch("call", {
@@ -134,34 +172,29 @@ export default {
// data 结果数据
this.lists = data.data;
this.listTotal = data.total;
- if ( this.lists.length <= 0 ) {
+ if (this.lists.length <= 0) {
this.noDataText = this.$L("无数据");
}
// msg 结果描述
}).catch(({msg}) => {
// msg 错误原因
$A.messageError(msg);
- }).finally( () => {
+ }).finally(() => {
this.loadIng = 0;
- } );
+ });
},
+
setPage(page) {
this.listPage = page;
this.getLists();
},
+
setPageSize(size) {
if (Math.max($A.runNum(this.listPageSize), 10) !== size) {
this.listPageSize = size;
this.getLists();
}
},
- timePick(e){
- // console.log(e)
- this.createAt = e;
- },
- typePick(e){
- // console.log(e)
- },
searchTab() {
this.getLists();
diff --git a/resources/assets/js/pages/manage/components/ReportReceive.vue b/resources/assets/js/pages/manage/components/ReportReceive.vue
index 72baa46a..5b2ebb4c 100644
--- a/resources/assets/js/pages/manage/components/ReportReceive.vue
+++ b/resources/assets/js/pages/manage/components/ReportReceive.vue
@@ -1,47 +1,80 @@
-
-
-
+
+
+ -
+
+ {{ $L("汇报人") }}
+
+
+
+
+
+ -
+
+ {{ $L("汇报类型") }}
+
+
+
+
+
+ -
+
+ {{ $L("汇报时间") }}
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+