npmapps 1.0.5 → 1.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -3,4 +3,6 @@
3
3
  1.0.2 v-fullScreen.browser.text
4
4
  1.0.3 ehcarts-3dpie
5
5
  1.0.4 EllTable
6
- 1.0.5 dialogFnJsx
6
+ 1.0.5 dialogFnJsx
7
+ 1.0.6 calendar
8
+ 1.0.7 employeeSchedulingManagement
@@ -0,0 +1,131 @@
1
+ <template>
2
+ <div class="attendanceCycle" v-loading="loading">
3
+ <div class="header">
4
+ <div class="left">
5
+ <el-button size="mini" type="primary" @click="onSave">选择</el-button>
6
+ </div>
7
+ <div class="right">
8
+ <el-select
9
+ size="mini"
10
+ v-model="year"
11
+ placeholder="请选择"
12
+ @change="yearChange"
13
+ >
14
+ <el-option
15
+ v-for="item in options"
16
+ :key="item.yearId"
17
+ :label="item.yearName"
18
+ :value="item.yearId"
19
+ >
20
+ </el-option>
21
+ </el-select>
22
+ </div>
23
+ </div>
24
+ <el-table
25
+ size="mini"
26
+ :data="tableData"
27
+ style="width: 100%"
28
+ border
29
+ @row-click="handleRowClick"
30
+ >
31
+ <!-- 单选框列 -->
32
+ <el-table-column width="50">
33
+ <template slot-scope="scope">
34
+ <el-radio
35
+ :value="currentRow.monthId"
36
+ :label="scope.row.monthId"
37
+ >&nbsp;</el-radio>
38
+ </template>
39
+ </el-table-column>
40
+ <el-table-column prop="monthName" label="名称"></el-table-column>
41
+ <el-table-column prop="monthName" label="开始日期"></el-table-column>
42
+ <el-table-column prop="monthName" label="结束日期"></el-table-column>
43
+ </el-table>
44
+ </div>
45
+ </template>
46
+
47
+ <script>
48
+ import {
49
+ getOpenAttendanceCycleMonthListApi,
50
+ getOpenAttendanceCycleYearListApi,
51
+ } from "../../employeeSchedulingManagement/data.js";
52
+
53
+ export default {
54
+ // 考勤周期
55
+ props: {
56
+ close: {
57
+ type: Function,
58
+ default: () => {},
59
+ },
60
+ setData:{
61
+ type: Function,
62
+ default: () => {},
63
+ },
64
+ },
65
+
66
+ data() {
67
+ return {
68
+ loading: false,
69
+ tableData: [],
70
+ year: "2025",
71
+ options: [],
72
+ currentRow: {
73
+ monthId: "",
74
+ }, // 当前选中的行
75
+ };
76
+ },
77
+ mounted() {
78
+ this.loading = false;
79
+ this.getTableData();
80
+ this.getYearList();
81
+ },
82
+ methods: {
83
+ getTableData() {
84
+ this.loading = true;
85
+ getOpenAttendanceCycleMonthListApi(this.year).then((res) => {
86
+ this.tableData = res;
87
+ console.log(res, "res");
88
+ this.loading = false;
89
+ });
90
+ },
91
+ getYearList() {
92
+ getOpenAttendanceCycleYearListApi().then((res) => {
93
+ this.options = res;
94
+ });
95
+ },
96
+ yearChange() {
97
+ this.getTableData();
98
+ },
99
+ handleRowClick(row) {
100
+ this.currentRow = row; // 点击行时更新选中状态
101
+ },
102
+ onSave() {
103
+ if (this.currentRow.monthId === "") {
104
+ return this.$message.error("请选择");
105
+ }
106
+ this.close();
107
+ this.setData(this.currentRow);
108
+ },
109
+
110
+ },
111
+ };
112
+ </script>
113
+
114
+ <style lang="less" scoped>
115
+ .attendanceCycle {
116
+ .header {
117
+ display: flex;
118
+ justify-content: space-between;
119
+ align-items: center;
120
+ margin-bottom: 10px;
121
+ .left {
122
+ display: flex;
123
+ align-items: center;
124
+ }
125
+ .right {
126
+ display: flex;
127
+ align-items: center;
128
+ }
129
+ }
130
+ }
131
+ </style>
@@ -0,0 +1,147 @@
1
+ <template>
2
+ <div class="attendanceCycle" v-loading="loading">
3
+ <div class="header">
4
+ <div class="left">
5
+ <el-button size="mini" type="primary" @click="onSave">选择</el-button>
6
+ </div>
7
+ <div class="right">
8
+
9
+ </div>
10
+ </div>
11
+ <el-table
12
+ size="mini"
13
+ :data="tableData"
14
+ style="width: 100%"
15
+ border
16
+ @row-click="handleRowClick"
17
+ >
18
+ <!-- 单选框列 -->
19
+ <el-table-column width="50">
20
+ <template slot-scope="scope">
21
+ <el-radio
22
+ :value="currentRow.monthId"
23
+ :label="scope.row.monthId"
24
+ >&nbsp;</el-radio>
25
+ </template>
26
+ </el-table-column>
27
+ <el-table-column prop="monthId" label="编码"></el-table-column>
28
+ <el-table-column prop="monthName" label="名称"></el-table-column>
29
+ <el-table-column prop="monthName" label="企业日历"></el-table-column>
30
+ <el-table-column prop="monthName" label="轮班制度"></el-table-column>
31
+ <el-table-column prop="monthName" label="状态"></el-table-column>
32
+ </el-table>
33
+ <div class="footer">
34
+ <div class="left">
35
+
36
+ </div>
37
+ <div class="right">
38
+ <el-pagination
39
+ @size-change="handleSizeChange"
40
+ @current-change="handleCurrentChange"
41
+ :current-page="currentPage"
42
+ :page-sizes="[10, 20, 30, 100]"
43
+ :page-size="10"
44
+ layout="total, sizes, prev, pager, next"
45
+ :total="total"
46
+ >
47
+ </el-pagination>
48
+ </div>
49
+ </div>
50
+ </div>
51
+ </template>
52
+
53
+ <script>
54
+ import {
55
+ getOpenAttendanceCycleMonthListApi,
56
+ } from "../../employeeSchedulingManagement/data.js";
57
+
58
+ export default {
59
+ // 考勤组
60
+ props: {
61
+ close: {
62
+ type: Function,
63
+ default: () => {},
64
+ },
65
+ setData:{
66
+ type: Function,
67
+ default: () => {},
68
+ },
69
+ },
70
+
71
+ data() {
72
+ return {
73
+ loading: false,
74
+ tableData: [],
75
+ year: "2025",
76
+ options: [],
77
+ currentRow: {
78
+ monthId: "",
79
+ }, // 当前选中的行
80
+ currentPage: 1,
81
+ total: 11110,
82
+ };
83
+ },
84
+ mounted() {
85
+ this.loading = false;
86
+ this.getTableData();
87
+ this.getYearList();
88
+ },
89
+ methods: {
90
+ getTableData() {
91
+ this.loading = true;
92
+ getOpenAttendanceCycleMonthListApi(this.year).then((res) => {
93
+ this.tableData = res;
94
+ console.log(res, "res");
95
+ this.loading = false;
96
+ });
97
+ },
98
+
99
+ yearChange() {
100
+ this.getTableData();
101
+ },
102
+ handleRowClick(row) {
103
+ this.currentRow = row; // 点击行时更新选中状态
104
+ },
105
+ onSave() {
106
+ if (this.currentRow.monthId === "") {
107
+ return this.$message.error("请选择");
108
+ }
109
+ this.close();
110
+ this.setData(this.currentRow);
111
+ },
112
+ handleSizeChange(val) {
113
+ this.currentPage = 1;
114
+ this.getTableData();
115
+ },
116
+ handleCurrentChange(val) {
117
+ this.currentPage = val;
118
+ this.getTableData();
119
+ },
120
+
121
+
122
+ },
123
+ };
124
+ </script>
125
+
126
+ <style lang="less" scoped>
127
+ .attendanceCycle {
128
+ .header {
129
+ display: flex;
130
+ justify-content: space-between;
131
+ align-items: center;
132
+ margin-bottom: 10px;
133
+ .left {
134
+ display: flex;
135
+ align-items: center;
136
+ }
137
+ .right {
138
+ display: flex;
139
+ align-items: center;
140
+ }
141
+ }
142
+ .footer {
143
+ display: flex;
144
+ justify-content: space-between;
145
+ }
146
+ }
147
+ </style>
@@ -0,0 +1,158 @@
1
+ <template>
2
+ <div class="attendanceCycle" v-loading="loading">
3
+ <div class="header">
4
+ <div class="left">
5
+ <el-button size="mini" type="primary" @click="onSave">选择</el-button>
6
+ </div>
7
+ <div class="right"></div>
8
+ </div>
9
+ <el-table
10
+ size="mini"
11
+ :data="tableData"
12
+ style="width: 100%"
13
+ border
14
+ @row-click="handleRowClick"
15
+ @selection-change="handleSelectionChange"
16
+ ref="multipleTable"
17
+ >
18
+ <!-- 单选框列 -->
19
+ <el-table-column width="50" v-if="!multiple">
20
+ <template slot-scope="scope">
21
+ <el-radio :value="currentRow.monthId" :label="scope.row.monthId"
22
+ >&nbsp;</el-radio
23
+ >
24
+ </template>
25
+ </el-table-column>
26
+ <el-table-column v-else type="selection" width="55"></el-table-column>
27
+ <el-table-column prop="monthId" label="工号"></el-table-column>
28
+ <el-table-column prop="monthName" label="姓名"></el-table-column>
29
+ <el-table-column prop="monthName" label="机构"></el-table-column>
30
+ <el-table-column prop="monthName" label="部门"></el-table-column>
31
+ <el-table-column prop="monthName" label="考勤组"></el-table-column>
32
+ <el-table-column prop="monthName" label="生效日期"></el-table-column>
33
+ </el-table>
34
+ <div class="footer">
35
+ <div class="left"></div>
36
+ <div class="right">
37
+ <el-pagination
38
+ @size-change="handleSizeChange"
39
+ @current-change="handleCurrentChange"
40
+ :current-page="currentPage"
41
+ :page-sizes="[10, 20, 30, 100]"
42
+ :page-size="10"
43
+ layout="total, sizes, prev, pager, next"
44
+ :total="total"
45
+ >
46
+ </el-pagination>
47
+ </div>
48
+ </div>
49
+ </div>
50
+ </template>
51
+
52
+ <script>
53
+ import { getOpenAttendanceCycleMonthListApi } from "../../employeeSchedulingManagement/data.js";
54
+
55
+ export default {
56
+ // 考勤人员
57
+ props: {
58
+ close: {
59
+ type: Function,
60
+ default: () => {},
61
+ },
62
+ setData: {
63
+ type: Function,
64
+ default: () => {},
65
+ },
66
+ multiple: {
67
+ type: Boolean,
68
+ default: false,
69
+ },
70
+ },
71
+
72
+ data() {
73
+ return {
74
+ loading: false,
75
+ tableData: [],
76
+ year: "2025",
77
+ options: [],
78
+ currentRow: {
79
+ monthId: "",
80
+ }, // 当前选中的行
81
+ currentPage: 1,
82
+ total: 11110,
83
+ multipleSelection: [],
84
+ };
85
+ },
86
+ mounted() {
87
+ this.loading = false;
88
+ this.getTableData();
89
+ },
90
+ methods: {
91
+ getTableData() {
92
+ this.loading = true;
93
+ getOpenAttendanceCycleMonthListApi(this.year).then((res) => {
94
+ this.tableData = res;
95
+ console.log(res, "res");
96
+ this.loading = false;
97
+ });
98
+ },
99
+
100
+ yearChange() {
101
+ this.getTableData();
102
+ },
103
+ handleRowClick(row) {
104
+ this.currentRow = row; // 点击行时更新选中状态
105
+ },
106
+ onSave() {
107
+ let data;
108
+ if (this.multiple) {
109
+ if (this.multipleSelection.length === 0)
110
+ return this.$message.error("请选择");
111
+ data = this.multipleSelection;
112
+ } else {
113
+ if (this.currentRow.monthId === "") {
114
+ return this.$message.error("请选择");
115
+ }
116
+ data = this.currentRow;
117
+ }
118
+ this.close();
119
+ this.setData(data);
120
+ },
121
+ handleSizeChange(val) {
122
+ this.currentPage = 1;
123
+ this.getTableData();
124
+ },
125
+ handleCurrentChange(val) {
126
+ this.currentPage = val;
127
+ this.getTableData();
128
+ },
129
+
130
+ handleSelectionChange(val) {
131
+ this.multipleSelection = val;
132
+ },
133
+ },
134
+ };
135
+ </script>
136
+
137
+ <style lang="less" scoped>
138
+ .attendanceCycle {
139
+ .header {
140
+ display: flex;
141
+ justify-content: space-between;
142
+ align-items: center;
143
+ margin-bottom: 10px;
144
+ .left {
145
+ display: flex;
146
+ align-items: center;
147
+ }
148
+ .right {
149
+ display: flex;
150
+ align-items: center;
151
+ }
152
+ }
153
+ .footer {
154
+ display: flex;
155
+ justify-content: space-between;
156
+ }
157
+ }
158
+ </style>
@@ -0,0 +1,147 @@
1
+ <template>
2
+ <div class="attendanceCycle" v-loading="loading">
3
+ <div class="header">
4
+ <div class="left">
5
+ <el-button size="mini" type="primary" @click="onSave">选择</el-button>
6
+ </div>
7
+ <div class="right">
8
+
9
+ </div>
10
+ </div>
11
+ <el-table
12
+ size="mini"
13
+ :data="tableData"
14
+ style="width: 100%"
15
+ border
16
+ @row-click="handleRowClick"
17
+ >
18
+ <!-- 单选框列 -->
19
+ <el-table-column width="50">
20
+ <template slot-scope="scope">
21
+ <el-radio
22
+ :value="currentRow.monthId"
23
+ :label="scope.row.monthId"
24
+ >&nbsp;</el-radio>
25
+ </template>
26
+ </el-table-column>
27
+ <el-table-column prop="monthId" label="表集合"></el-table-column>
28
+ <el-table-column prop="monthId" label="编码"></el-table-column>
29
+ <el-table-column prop="monthName" label="名称"></el-table-column>
30
+ <el-table-column prop="monthName" label="起始年度"></el-table-column>
31
+ <el-table-column prop="monthName" label="终止年度"></el-table-column>
32
+ <el-table-column prop="monthName" label="公共假日为工作日"></el-table-column>
33
+ </el-table>
34
+ <div class="footer">
35
+ <div class="left">
36
+
37
+ </div>
38
+ <div class="right">
39
+ <el-pagination
40
+ @size-change="handleSizeChange"
41
+ @current-change="handleCurrentChange"
42
+ :current-page="currentPage"
43
+ :page-sizes="[10, 20, 30, 100]"
44
+ :page-size="10"
45
+ layout="total, sizes, prev, pager, next"
46
+ :total="total"
47
+ >
48
+ </el-pagination>
49
+ </div>
50
+ </div>
51
+ </div>
52
+ </template>
53
+
54
+ <script>
55
+ import {
56
+ getOpenAttendanceCycleMonthListApi,
57
+ } from "../../employeeSchedulingManagement/data.js";
58
+
59
+ export default {
60
+ // 企业日历
61
+ props: {
62
+ close: {
63
+ type: Function,
64
+ default: () => {},
65
+ },
66
+ setData:{
67
+ type: Function,
68
+ default: () => {},
69
+ },
70
+ },
71
+
72
+ data() {
73
+ return {
74
+ loading: false,
75
+ tableData: [],
76
+ year: "2025",
77
+ options: [],
78
+ currentRow: {
79
+ monthId: "",
80
+ }, // 当前选中的行
81
+ currentPage: 1,
82
+ total: 11110,
83
+ };
84
+ },
85
+ mounted() {
86
+ this.loading = false;
87
+ this.getTableData();
88
+ },
89
+ methods: {
90
+ getTableData() {
91
+ this.loading = true;
92
+ getOpenAttendanceCycleMonthListApi(this.year).then((res) => {
93
+ this.tableData = res;
94
+ console.log(res, "res");
95
+ this.loading = false;
96
+ });
97
+ },
98
+
99
+ yearChange() {
100
+ this.getTableData();
101
+ },
102
+ handleRowClick(row) {
103
+ this.currentRow = row; // 点击行时更新选中状态
104
+ },
105
+ onSave() {
106
+ if (this.currentRow.monthId === "") {
107
+ return this.$message.error("请选择");
108
+ }
109
+ this.close();
110
+ this.setData(this.currentRow);
111
+ },
112
+ handleSizeChange(val) {
113
+ this.currentPage = 1;
114
+ this.getTableData();
115
+ },
116
+ handleCurrentChange(val) {
117
+ this.currentPage = val;
118
+ this.getTableData();
119
+ },
120
+
121
+
122
+ },
123
+ };
124
+ </script>
125
+
126
+ <style lang="less" scoped>
127
+ .attendanceCycle {
128
+ .header {
129
+ display: flex;
130
+ justify-content: space-between;
131
+ align-items: center;
132
+ margin-bottom: 10px;
133
+ .left {
134
+ display: flex;
135
+ align-items: center;
136
+ }
137
+ .right {
138
+ display: flex;
139
+ align-items: center;
140
+ }
141
+ }
142
+ .footer {
143
+ display: flex;
144
+ justify-content: space-between;
145
+ }
146
+ }
147
+ </style>