From 75034e8c353c2e9773f02d88dc520dabb8ce63d2 Mon Sep 17 00:00:00 2001 From: yanran200730 Date: Mon, 23 May 2022 15:23:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B9=A1=E6=9D=91=E7=9B=B8=E5=86=8C=20=20?= =?UTF-8?q?=E8=80=83=E5=8B=A4=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/serve.js | 6 +- src/saas/AppCountryAlbum/AddReport.vue | 5 +- src/saas/AppCountryAlbum/Attendance.vue | 61 ++++- .../AppCountryAlbum/AttendanceFiexdTime.vue | 194 ++++++++++++---- .../AttendanceFlexibleTime.vue | 195 +++++++++++++--- .../AppCountryAlbum/AttendanceSetting.vue | 147 +++++++++++- src/saas/AppCountryAlbum/ChooseAddess.vue | 28 ++- src/saas/AppCountryAlbum/ReportImg.vue | 212 ++++++++++++++++++ .../AppCountryAlbum/components/Organize.vue | 73 +++++- .../components/report/InspectLog.vue | 2 +- .../components/report/MeetingMminutes.vue | 86 ++++--- 11 files changed, 860 insertions(+), 149 deletions(-) create mode 100644 src/saas/AppCountryAlbum/ReportImg.vue diff --git a/bin/serve.js b/bin/serve.js index 39ed1d1f..f8734632 100644 --- a/bin/serve.js +++ b/bin/serve.js @@ -5,7 +5,7 @@ const getFileInfo = (app, file) => { let vue = fs.readFileSync(file).toString() if (/appName/.test(vue)) { let appName = vue.replace(/[\s\S]*(appName:.+),[\s\S]*/gm, '$1') - app.label = appName.replace(/(appName:|["'])/g, '')?.trim() + app.label = appName.replace(/(appName:|["'])/g, '').trim() if (/customNavigation/.test(vue)) { app.style = {navigationStyle: "custom"} } else @@ -14,13 +14,13 @@ const getFileInfo = (app, file) => { if (/^App/.test(app.name)) { let {name, label} = app, path = app.path.replace(/.+[\\\/]([^\\\/]+)[\\\/]([^\\\/]+)$/g, `/apps/$1/$2`) - apps.list.push({id: name, name, label, path, libPath: file?.replace(/\\/g, '/')?.replace(/^src(\/.+)\.vue/, '$1'), type: 'wxwork'}) + apps.list.push({id: name, name, label, path, libPath: file.replace(/\\/g, '/').replace(/^src(\/.+)\.vue/, '$1'), type: 'wxwork'}) } } const saveApps = app => { if (app.list.length > 0) { axios.post("http://192.168.1.87:12525/node/wechatapps/addOrUpdate", app).then(res => { - if (res?.code == 0) chalkTag.done("产品库目录已同步至后台数据库...") + if (res.code == 0) chalkTag.done("产品库目录已同步至后台数据库...") }).catch(() => 0) } } diff --git a/src/saas/AppCountryAlbum/AddReport.vue b/src/saas/AppCountryAlbum/AddReport.vue index 3a7dfe51..f85e2186 100644 --- a/src/saas/AppCountryAlbum/AddReport.vue +++ b/src/saas/AppCountryAlbum/AddReport.vue @@ -69,7 +69,10 @@ formData.append('file', file) this.$http.post('/admin/file/add2?type=image', formData).then(res => { if (res.code === 0) { - console.log(res.data.url) + const data = this.configList[this.currIndex] + uni.navigateTo({ + url: `./ReportImg?img=${res.data.url}&type=${data.watermarkType}&templateId=${data.id}` + }) } uni.hideLoading() diff --git a/src/saas/AppCountryAlbum/Attendance.vue b/src/saas/AppCountryAlbum/Attendance.vue index 39ddd434..c6f6c0e1 100644 --- a/src/saas/AppCountryAlbum/Attendance.vue +++ b/src/saas/AppCountryAlbum/Attendance.vue @@ -3,16 +3,18 @@
-

09

+

{{ DD }}

-

2022年2月

+

{{ yyyyMM }}

日·数据统计

-
- - 切换日期 -
+ +
+ + 切换日期 +
+
@@ -22,7 +24,7 @@ 已出勤 10 未出勤 10
-
考勤设置
+
考勤设置
@@ -53,12 +55,34 @@ data () { return { - currIndex: 0 + photoTotal: {}, + date: '', + currIndex: 0, + list: [] } }, - onLoad () { + computed: { + yyyyMM () { + if (this.date) { + return this.date.substr(0, 8) + } + return '' + }, + + DD () { + if (this.date) { + return this.date.substr(8) + } + + return '' + } + }, + + created () { + this.date = this.$dayjs(new Date).format('YYYY年MM月DD') + this.getList() }, methods: { @@ -66,6 +90,23 @@ uni.navigateTo({ url }) + }, + + onDateChange (e) { + const values = e.detail.value.split('-') + this.date = `${values[0]}年${values[1]}月${values[2]}` + + this.$nextTick(() => { + this.getList() + }) + }, + + getList () { + this.$http.post(`/api/appattendancerecord/userphotosort?queryTime=${this.date}`).then(res => { + if (res.code === 0) { + this.list = res.data + } + }) } } } @@ -247,4 +288,4 @@ } } } - \ No newline at end of file + diff --git a/src/saas/AppCountryAlbum/AttendanceFiexdTime.vue b/src/saas/AppCountryAlbum/AttendanceFiexdTime.vue index e89a59b4..53357a42 100644 --- a/src/saas/AppCountryAlbum/AttendanceFiexdTime.vue +++ b/src/saas/AppCountryAlbum/AttendanceFiexdTime.vue @@ -6,20 +6,24 @@ 上班打卡时间
-
- 09:00 - -
+ +
+ {{ form.workInTime || '请设置时间' }} + +
+
下班打卡时间
-
- 18:00 - -
+ +
+ {{ form.workOutTime || '请设置时间' }} + +
+
@@ -29,28 +33,32 @@

若开启休息时间,则休息时间不计入工作时长

- +
-
+
休息开始
-
- 请设置时间 - -
+ +
+ {{ form.restTimeBegin || '请设置时间' }} + +
+
-
+
休息结束
-
- 请设置时间 - -
+ +
+ {{ form.restTimeEnd || '请设置时间' }} + +
+
@@ -65,20 +73,24 @@ 上班打卡
-
- 上班前2小时可打卡 - -
+ +
+ {{ form.workInFrom || '请设置时间' }} + +
+
下班打卡
-
- 下班后2小时可打卡 - -
+ +
+ {{ form.workOutEnd || '请设置时间' }} + +
+
@@ -88,28 +100,28 @@

若开启,不在固定范围内打卡将不计入考勤

- +
-
+
-

绿地蓝海A座

-

湖北省武汉市武昌区和平大道750号

-

允许打卡范围200米

+

{{ address.title }}

+

{{ address.address }}

+

允许打卡范围{{ address.distance }}米

-
+
删除
-
+

添加打卡点

-
保存
+
保存
@@ -167,12 +283,19 @@ padding: 32px 0; .left { + flex: 1; + margin-right: 10px; + h2 { margin-bottom: 12px; color: #333333; font-size: 32px; } + p { + line-height: 1.2; + } + &.left-add { display: flex; align-items: center; @@ -243,4 +366,4 @@ } } } - \ No newline at end of file + diff --git a/src/saas/AppCountryAlbum/AttendanceSetting.vue b/src/saas/AppCountryAlbum/AttendanceSetting.vue index 640962d0..811af7fe 100644 --- a/src/saas/AppCountryAlbum/AttendanceSetting.vue +++ b/src/saas/AppCountryAlbum/AttendanceSetting.vue @@ -1,14 +1,14 @@