乡村相册 考勤配置
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -3,16 +3,18 @@
|
||||
<div class="Attendance-top">
|
||||
<div>
|
||||
<div class="left">
|
||||
<h2>09</h2>
|
||||
<h2>{{ DD }}</h2>
|
||||
<div class="left-wrapper__right">
|
||||
<h3>2022年2月</h3>
|
||||
<h3>{{ yyyyMM }}</h3>
|
||||
<p>日·数据统计</p>
|
||||
</div>
|
||||
</div>
|
||||
<picker mode="date" :value="date" @change="onDateChange">
|
||||
<div class="right">
|
||||
<image src="./images/qiehuan.png" />
|
||||
<span>切换日期</span>
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
@@ -22,7 +24,7 @@
|
||||
<span @click="currIndex = 1" :class="[currIndex === 1 ? 'active' : '']">已出勤 10</span>
|
||||
<span @click="currIndex = 2" :class="[currIndex === 2 ? 'active' : '']">未出勤 10</span>
|
||||
</div>
|
||||
<div class="right" @click="linkTo('/saas/AppCountryAlbum/AttendanceSetting')">考勤设置</div>
|
||||
<div class="right" @click="linkTo('./AttendanceSetting')">考勤设置</div>
|
||||
</div>
|
||||
<div class="info-table">
|
||||
<div class="table-header">
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,20 +6,24 @@
|
||||
<label>*</label>
|
||||
<span>上班打卡时间</span>
|
||||
</div>
|
||||
<picker mode="time" start="08:00" end="21:00" @change="e => onTimeChange(e, 'workInTime')">
|
||||
<div class="right">
|
||||
<span>09:00</span>
|
||||
<span>{{ form.workInTime || '请设置时间' }}</span>
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
<div class="form-group__item">
|
||||
<div class="left">
|
||||
<label>*</label>
|
||||
<span>下班打卡时间</span>
|
||||
</div>
|
||||
<picker mode="time" start="08:00" end="21:00" @change="e => onTimeChange(e, 'workOutTime')">
|
||||
<div class="right">
|
||||
<span>18:00</span>
|
||||
<span>{{ form.workOutTime || '请设置时间' }}</span>
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -29,28 +33,32 @@
|
||||
<p>若开启休息时间,则休息时间不计入工作时长</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<switch color="#1088F9" checked />
|
||||
<switch color="#1088F9" :checked="form.openRestTime === '1'" @change="onOpenRestChange" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group__item">
|
||||
<div class="form-group__item" v-if="form.openRestTime === '1'">
|
||||
<div class="left">
|
||||
<label>*</label>
|
||||
<span>休息开始</span>
|
||||
</div>
|
||||
<picker mode="time" start="08:00" end="21:00" @change="e => onTimeChange(e, 'restTimeBegin')">
|
||||
<div class="right">
|
||||
<span>请设置时间</span>
|
||||
<span>{{ form.restTimeBegin || '请设置时间' }}</span>
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
<div class="form-group__item">
|
||||
<div class="form-group__item" v-if="form.openRestTime === '1'">
|
||||
<div class="left">
|
||||
<label>*</label>
|
||||
<span>休息结束</span>
|
||||
</div>
|
||||
<picker mode="time" start="08:00" end="21:00" @change="e => onTimeChange(e, 'restTimeEnd')">
|
||||
<div class="right">
|
||||
<span>请设置时间</span>
|
||||
<span>{{ form.restTimeEnd || '请设置时间' }}</span>
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -65,20 +73,24 @@
|
||||
<label>*</label>
|
||||
<span>上班打卡</span>
|
||||
</div>
|
||||
<picker mode="time" start="08:00" end="21:00" @change="e => onTimeChange(e, 'workInFrom')">
|
||||
<div class="right">
|
||||
<span>上班前2小时可打卡</span>
|
||||
<span>{{ form.workInFrom || '请设置时间' }}</span>
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
<div class="form-group__item">
|
||||
<div class="left">
|
||||
<label>*</label>
|
||||
<span>下班打卡</span>
|
||||
</div>
|
||||
<picker mode="time" start="08:00" end="21:00" @change="e => onTimeChange(e, 'workOutEnd')">
|
||||
<div class="right">
|
||||
<span>下班后2小时可打卡</span>
|
||||
<span>{{ form.workOutEnd || '请设置时间' }}</span>
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -88,28 +100,28 @@
|
||||
<p>若开启,不在固定范围内打卡将不计入考勤</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<switch color="#1088F9" checked />
|
||||
<switch color="#1088F9" :checked="form.openWorkPoint === '1'" @change="onWorkPointChange" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group__item form-group__checked">
|
||||
<div class="form-group__item form-group__checked" v-if="form.openWorkPoint === '1' && address.address">
|
||||
<div class="left">
|
||||
<h2>绿地蓝海A座</h2>
|
||||
<p>湖北省武汉市武昌区和平大道750号</p>
|
||||
<p style="margin-top: 8px;">允许打卡范围200米</p>
|
||||
<h2>{{ address.title }}</h2>
|
||||
<p>{{ address.address }}</p>
|
||||
<p style="margin-top: 8px;">允许打卡范围{{ address.distance }}米</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="right" @click="address = {}">
|
||||
<image :src="`${$cdn}askform/sc1.png`" />
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group__item form-group__checked">
|
||||
<div class="form-group__item form-group__checked" v-if="form.openWorkPoint === '1' && !address.address">
|
||||
<div class="left left-add" @click="linkTo('/saas/AppCountryAlbum/ChooseAddess')">
|
||||
<div class="add-btn"></div>
|
||||
<h2 style="color: #1088F9;">添加打卡点</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-btn" hover-class="text-hover">保存</div>
|
||||
<div class="form-btn" hover-class="text-hover" @click="save">保存</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -120,12 +132,34 @@
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
form: {
|
||||
openRestTime: '1',
|
||||
openWorkPoint: '0',
|
||||
workInTime: '',
|
||||
restTimeBegin: '',
|
||||
restTimeEnd: '',
|
||||
workOutTime: '',
|
||||
workInFrom: '',
|
||||
workOutEnd: ''
|
||||
},
|
||||
address: {}
|
||||
}
|
||||
},
|
||||
|
||||
onLoad () {
|
||||
onLoad (query) {
|
||||
uni.$on('address', e => {
|
||||
this.address = e
|
||||
})
|
||||
|
||||
if (query.id) {
|
||||
this.id = query.id
|
||||
|
||||
this.getInfo(query.id)
|
||||
}
|
||||
},
|
||||
|
||||
onUnload () {
|
||||
uni.$off('address')
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -133,6 +167,90 @@
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
|
||||
getInfo (id) {
|
||||
this.$http.post(`/api/appattendanceconfig/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.address = JSON.parse(res.data.workPointDesc)
|
||||
this.form = {
|
||||
...this.form,
|
||||
...res.data
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onTimeChange (e, type) {
|
||||
this.form[type] = e.detail.value + ':00'
|
||||
},
|
||||
|
||||
onOpenRestChange (e) {
|
||||
this.form.restTimeBegin = ''
|
||||
this.form.restTimeEnd = ''
|
||||
this.form.openRestTime = e.detail.value ? '1' : '0'
|
||||
},
|
||||
|
||||
onWorkPointChange (e) {
|
||||
this.form.openWorkPoint = e.detail.value ? '1' : '0'
|
||||
},
|
||||
|
||||
save () {
|
||||
if (!this.form.workInTime) {
|
||||
return this.$u.toast('请选择上班打卡时间')
|
||||
}
|
||||
|
||||
if (!this.form.workOutTime) {
|
||||
return this.$u.toast('请选择下班打卡时间')
|
||||
}
|
||||
|
||||
if (this.form.openRestTime === '1') {
|
||||
if (!this.form.restTimeBegin) {
|
||||
return this.$u.toast('请选择休息时间')
|
||||
}
|
||||
|
||||
if (!this.form.restTimeEnd) {
|
||||
return this.$u.toast('请选择休息结束时间')
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.form.workInFrom) {
|
||||
return this.$u.toast('请选择上班打卡最早时间')
|
||||
}
|
||||
|
||||
if (!this.form.workOutEnd) {
|
||||
return this.$u.toast('请选择下班打卡最晚时间')
|
||||
}
|
||||
|
||||
if (this.form.openWorkPoint === '1' && !this.address.address) {
|
||||
return this.$u.toast('请选择固定打卡点')
|
||||
}
|
||||
|
||||
this.$loading()
|
||||
this.$http.post('/api/appattendanceconfig/addOrUpdate', {
|
||||
openRestTime: this.form.openRestTime,
|
||||
openWorkPoint: this.form.openWorkPoint,
|
||||
workInFrom: `${this.form.workInFrom}`,
|
||||
workOutEnd: `${this.form.workOutEnd}`,
|
||||
workInTime: `${this.form.workInTime}`,
|
||||
workOutTime: `${this.form.workOutTime}`,
|
||||
restTimeBegin: `${this.form.restTimeBegin}`,
|
||||
restTimeEnd: `${this.form.restTimeEnd}`,
|
||||
type: 0,
|
||||
workPointDesc: JSON.stringify(this.address),
|
||||
id: this.id || ''
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$u.toast('提交成功')
|
||||
|
||||
setTimeout(() => {
|
||||
uni.$emit('update')
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,20 +6,24 @@
|
||||
<label>*</label>
|
||||
<span>最早允许打卡时间</span>
|
||||
</div>
|
||||
<picker mode="time" start="08:00" end="21:00" @change="e => onTimeChange(e, 'workInFrom')">
|
||||
<div class="right">
|
||||
<span>09:00</span>
|
||||
<span>{{ form.workInFrom || '请设置时间' }}</span>
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
<div class="form-group__item">
|
||||
<div class="left">
|
||||
<label>*</label>
|
||||
<span>最晚允许打卡时间</span>
|
||||
</div>
|
||||
<picker mode="time" start="08:00" end="21:00" @change="e => onTimeChange(e, 'workOutEnd')">
|
||||
<div class="right">
|
||||
<span>18:00</span>
|
||||
<span>{{ form.workOutEnd || '请设置时间' }}</span>
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -29,28 +33,32 @@
|
||||
<p>若开启休息时间,则休息时间不计入工作时长</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<switch color="#1088F9" checked />
|
||||
<switch color="#1088F9" :checked="form.openRestTime === '1'" @change="onOpenRestChange" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group__item">
|
||||
<div class="form-group__item" v-if="form.openRestTime === '1'">
|
||||
<div class="left">
|
||||
<label>*</label>
|
||||
<span>休息开始</span>
|
||||
</div>
|
||||
<picker mode="time" start="08:00" end="21:00" @change="e => onTimeChange(e, 'restTimeBegin')">
|
||||
<div class="right">
|
||||
<span>请设置时间</span>
|
||||
<span>{{ form.restTimeBegin || '请设置时间' }}</span>
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
<div class="form-group__item">
|
||||
<div class="form-group__item" v-if="form.openRestTime === '1'">
|
||||
<div class="left">
|
||||
<label>*</label>
|
||||
<span>休息结束</span>
|
||||
</div>
|
||||
<picker mode="time" start="08:00" end="21:00" @change="e => onTimeChange(e, 'restTimeEnd')">
|
||||
<div class="right">
|
||||
<span>请设置时间</span>
|
||||
<span>{{ form.restTimeEnd || '请设置时间' }}</span>
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -64,10 +72,12 @@
|
||||
<label>*</label>
|
||||
<span>时长要求</span>
|
||||
</div>
|
||||
<picker :range="hours" mode="selector" @change="e => form.workHoursLimit = hours[e.detail.value]">
|
||||
<div class="right">
|
||||
<span>8小时</span>
|
||||
<span>{{ form.workHoursLimit ? form.workHoursLimit + '小时' : '请选择工作时长' }}</span>
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
@@ -77,28 +87,28 @@
|
||||
<p>若开启,不在固定范围内打卡将不计入考勤</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<switch color="#1088F9" checked />
|
||||
<switch color="#1088F9" :checked="form.openWorkPoint === '1'" @change="onWorkPointChange" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group__item form-group__checked">
|
||||
<div class="form-group__item form-group__checked" v-if="form.openWorkPoint === '1' && address.address">
|
||||
<div class="left">
|
||||
<h2>绿地蓝海A座</h2>
|
||||
<p>湖北省武汉市武昌区和平大道750号</p>
|
||||
<p style="margin-top: 8px;">允许打卡范围200米</p>
|
||||
<h2>{{ address.title }}</h2>
|
||||
<p>{{ address.address }}</p>
|
||||
<p style="margin-top: 8px;">允许打卡范围{{ address.distance }}米</p>
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="right" @click="address = {}">
|
||||
<image :src="`${$cdn}askform/sc1.png`" />
|
||||
<span>删除</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group__item form-group__checked">
|
||||
<div class="left left-add">
|
||||
<div class="form-group__item form-group__checked" v-if="form.openWorkPoint === '1' && !address.address">
|
||||
<div class="left left-add" @click="linkTo('/saas/AppCountryAlbum/ChooseAddess')">
|
||||
<div class="add-btn"></div>
|
||||
<h2 style="color: #1088F9;">添加打卡点</h2>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-btn" hover-class="text-hover">保存</div>
|
||||
<div class="form-btn" hover-class="text-hover" @click="save">保存</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@@ -106,18 +116,124 @@
|
||||
name: 'AttendanceFlexibleTime',
|
||||
|
||||
appName: '灵活时间打卡设置',
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
hours: ['1', '2', '3', '4', '5', '6', '7', '8', '9', '10', '11', '12', '13', '14', '15', '16', '17'],
|
||||
form: {
|
||||
openRestTime: '1',
|
||||
openWorkPoint: '0',
|
||||
workHoursLimit: '',
|
||||
restTimeBegin: '',
|
||||
restTimeEnd: '',
|
||||
workInFrom: '',
|
||||
workOutEnd: ''
|
||||
},
|
||||
address: {},
|
||||
id: ''
|
||||
}
|
||||
},
|
||||
|
||||
onLoad () {
|
||||
onLoad (query) {
|
||||
uni.$on('address', e => {
|
||||
this.address = e
|
||||
})
|
||||
|
||||
if (query.id) {
|
||||
this.id = query.id
|
||||
|
||||
this.getInfo(query.id)
|
||||
}
|
||||
},
|
||||
|
||||
onUnload () {
|
||||
uni.$off('address')
|
||||
},
|
||||
|
||||
methods: {
|
||||
linkTo (url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
|
||||
getInfo (id) {
|
||||
this.$http.post(`/api/appattendanceconfig/queryDetailById?id=${id}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.address = JSON.parse(res.data.workPointDesc)
|
||||
this.form = {
|
||||
...this.form,
|
||||
...res.data
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onTimeChange (e, type) {
|
||||
this.form[type] = e.detail.value + ':00'
|
||||
},
|
||||
|
||||
onOpenRestChange (e) {
|
||||
this.form.restTimeBegin = ''
|
||||
this.form.restTimeEnd = ''
|
||||
this.form.openRestTime = e.detail.value ? '1' : '0'
|
||||
},
|
||||
|
||||
onWorkPointChange (e) {
|
||||
this.form.openWorkPoint = e.detail.value ? '1' : '0'
|
||||
},
|
||||
|
||||
save () {
|
||||
if (!this.form.workInFrom) {
|
||||
return this.$u.toast('请选择最早打卡时间')
|
||||
}
|
||||
|
||||
if (!this.form.workOutEnd) {
|
||||
return this.$u.toast('请选择最晚打卡时间')
|
||||
}
|
||||
|
||||
if (this.form.openRestTime === '1') {
|
||||
if (!this.form.restTimeBegin) {
|
||||
return this.$u.toast('请选择休息时间')
|
||||
}
|
||||
|
||||
if (!this.form.restTimeEnd) {
|
||||
return this.$u.toast('请选择休息结束时间')
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.form.workHoursLimit) {
|
||||
return this.$u.toast('请选择工作时长')
|
||||
}
|
||||
|
||||
if (this.form.openWorkPoint === '1' && !this.address.address) {
|
||||
return this.$u.toast('请选择固定打卡点')
|
||||
}
|
||||
|
||||
this.$loading()
|
||||
this.$http.post('/api/appattendanceconfig/addOrUpdate', {
|
||||
openRestTime: this.form.openRestTime,
|
||||
workHoursLimit: this.form.workHoursLimit,
|
||||
openWorkPoint: this.form.openWorkPoint,
|
||||
workInFrom: `${this.form.workInFrom}`,
|
||||
workOutEnd: `${this.form.workOutEnd}`,
|
||||
restTimeBegin: `${this.form.restTimeBegin}`,
|
||||
restTimeEnd: `${this.form.restTimeEnd}`,
|
||||
type: 1,
|
||||
workPointDesc: JSON.stringify(this.address),
|
||||
id: this.id || ''
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$u.toast('提交成功')
|
||||
|
||||
setTimeout(() => {
|
||||
uni.$emit('update')
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -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;
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div class="AttendanceSetting">
|
||||
<div class="cell-group">
|
||||
<div class="cell-item" hover-class="bg-hover" @click="linkTo('/saas/AppCountryAlbum/AttendanceFiexdTime')">
|
||||
<div class="AttendanceSetting" v-if="pageShow">
|
||||
<div class="cell-group" v-if="!list.length">
|
||||
<div class="cell-item" hover-class="bg-hover" @click="linkTo('./AttendanceFiexdTime')">
|
||||
<div class="cell-item__left">
|
||||
<h2>固定时间上下班</h2>
|
||||
<p>有固定的上下班时间,考核迟到早退</p>
|
||||
</div>
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
<div class="cell-item" hover-class="bg-hover" @click="linkTo('/saas/AppCountryAlbum/AttendanceFlexibleTime')">
|
||||
<div class="cell-item" hover-class="bg-hover" @click="linkTo('./AttendanceFlexibleTime')">
|
||||
<div class="cell-item__left">
|
||||
<h2>灵活时间上下班</h2>
|
||||
<p>上下班时间不固定,考核工时时长</p>
|
||||
@@ -16,6 +16,43 @@
|
||||
<image src="./images/right.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="list.length">
|
||||
<div class="config" v-for="(item, index) in list" :key="index">
|
||||
<h2>当前配置:{{ item.title }}</h2>
|
||||
<div class="config-wrapper">
|
||||
<div class="config-item" v-if="item.type === '0'">
|
||||
<label>上班时间:</label>
|
||||
<span>{{ item.type === '0' ? item.workInTime : item.workInFrom }} - {{ item.type === '0' ? item.workOutTime : item.workOutEnd }}</span>
|
||||
</div>
|
||||
<div class="config-item" v-if="item.type === '1'">
|
||||
<label>工作时长:</label>
|
||||
<span>{{ item.workHoursLimit }}小时</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<label>休息时间:</label>
|
||||
<span v-if="item.openRestTime === '0'">未开启</span>
|
||||
<span v-else>{{ item.restTimeBegin }} - {{ item.restTimeEnd }}</span>
|
||||
</div>
|
||||
<div class="config-item">
|
||||
<label>打卡时间范围:</label>
|
||||
<!-- <span>上班前2小时,下班后2小时打卡生效</span> -->
|
||||
<span>{{ item.workInFrom }} - {{ item.workOutEnd }}</span>
|
||||
</div>
|
||||
<div class="config-item config-item__line" v-if="item.openWorkPoint === '1'">
|
||||
<label>固定打卡点:</label>
|
||||
<span>{{ item.workPointDesc.address }}</span>
|
||||
</div>
|
||||
<div class="config-item" v-else>
|
||||
<label>固定打卡点:</label>
|
||||
<span>未固定打卡点</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="config-footer">
|
||||
<div @click="toEdit(item)">修改规则</div>
|
||||
<div @click="remove(item.id)">删除规则</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tips">
|
||||
当前考勤时间为00:00~24:00,若新增考勤规则则以
|
||||
新增规则为准;
|
||||
@@ -35,12 +72,18 @@
|
||||
|
||||
data () {
|
||||
return {
|
||||
|
||||
list: [],
|
||||
pageShow: false
|
||||
}
|
||||
},
|
||||
|
||||
onLoad () {
|
||||
this.$loading()
|
||||
this.getConfigList()
|
||||
|
||||
uni.$on('update', () => {
|
||||
this.getConfigList()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
@@ -48,6 +91,42 @@
|
||||
uni.navigateTo({
|
||||
url
|
||||
})
|
||||
},
|
||||
|
||||
toEdit (item) {
|
||||
if (item.type === '0') {
|
||||
this.linkTo(`./AttendanceFiexdTime?id=${item.id}`)
|
||||
} else {
|
||||
this.linkTo(`./AttendanceFlexibleTime?id=${item.id}`)
|
||||
}
|
||||
},
|
||||
|
||||
remove (id) {
|
||||
this.$confirm('确定删除该数据?').then(() => {
|
||||
this.$http.post(`/app/appattendanceconfig/delete?ids=${id}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$u.toast('删除成功')
|
||||
this.getConfigList()
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
getConfigList () {
|
||||
this.$http.post(`/api/appattendanceconfig/list?size=1`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = res.data.records.map(v => {
|
||||
return {
|
||||
...v,
|
||||
title: v.type === '0' ? '固定时间上下班' : '灵活时间上下班',
|
||||
workPointDesc: JSON.parse(v.workPointDesc)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
this.pageShow = true
|
||||
uni.hideLoading()
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -61,6 +140,7 @@
|
||||
.bg-hover {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
.AttendanceSetting {
|
||||
.tips {
|
||||
line-height: 44px;
|
||||
@@ -70,6 +150,61 @@
|
||||
white-space: pre-line;
|
||||
}
|
||||
|
||||
.config {
|
||||
padding: 32rpx 32rpx 0;
|
||||
background: #fff;
|
||||
|
||||
h2 {
|
||||
margin-bottom: 24px;
|
||||
color: #333333;
|
||||
font-size: 32px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.config-wrapper {
|
||||
padding-bottom: 32px;
|
||||
|
||||
.config-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 40px;
|
||||
margin-bottom: 8px;
|
||||
font-size: 28px;
|
||||
color: #333333;
|
||||
|
||||
label {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
&.config-item__line {
|
||||
display: block;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.config-footer {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 108px;
|
||||
border-top: 1px solid #DDDDDD;
|
||||
|
||||
div {
|
||||
flex: 1;
|
||||
font-size: 32px;
|
||||
color: #1365DD;
|
||||
text-align: center;
|
||||
|
||||
&:last-child {
|
||||
color: #FF4466;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cell-group {
|
||||
.cell-item {
|
||||
display: flex;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
<div class="wrapper">
|
||||
<div class="top">
|
||||
<span @click="isShow = false">取消</span>
|
||||
<span>确定</span>
|
||||
<span @click="confirm">确定</span>
|
||||
</div>
|
||||
<div class="address-search">
|
||||
<div class="address-search__wrapper">
|
||||
@@ -30,7 +30,7 @@
|
||||
<div class="address-btn">
|
||||
<span>打卡有效范围</span>
|
||||
<div class="right" @click="isShowScope = true">
|
||||
<i>{{ distance[chooseIndex] }}</i>
|
||||
<i>{{ distance[chooseIndex] }}米</i>
|
||||
<image src="./images/w-right.png" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -75,7 +75,7 @@
|
||||
lib: null,
|
||||
map: null,
|
||||
latLng: null,
|
||||
distance: ['100米', '200米', '300米', '400米', '500米'],
|
||||
distance: ['100', '200', '300', '400', '500'],
|
||||
addressList: [],
|
||||
page: 1,
|
||||
marker: null,
|
||||
@@ -124,6 +124,20 @@
|
||||
})
|
||||
},
|
||||
|
||||
confirm () {
|
||||
const address = this.addressList[this.currIndex]
|
||||
uni.$emit('address', {
|
||||
address: address.address,
|
||||
title: address.title,
|
||||
lat: address.location.lat,
|
||||
lng: address.location.lng,
|
||||
distance: this.distance[this.chooseIndex]
|
||||
})
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
chooseAddress (index) {
|
||||
this.addMarker(this.addressList[index].location)
|
||||
this.currIndex = index
|
||||
|
||||
212
src/saas/AppCountryAlbum/ReportImg.vue
Normal file
212
src/saas/AppCountryAlbum/ReportImg.vue
Normal file
@@ -0,0 +1,212 @@
|
||||
<template>
|
||||
<div class="photo">
|
||||
<div class="photo-top">
|
||||
<image src="./images/close.png" @click="back" />
|
||||
<div class="photo-top__middle" @click="isShowAlbum = true">
|
||||
<span>保存至:{{ albumName || '默认相册' }}</span>
|
||||
<image src="./images/to-right.png" />
|
||||
</div>
|
||||
<div></div>
|
||||
</div>
|
||||
<image mode="aspectFit" :src="img" @click="preview(img)" />
|
||||
<div class="photo-footer">
|
||||
<div class="item" @click="back">
|
||||
<image src="./images/fanhui.png" />
|
||||
<span>返回</span>
|
||||
</div>
|
||||
<div class="item" @click="upload">
|
||||
<image src="./images/shangchuan.png" />
|
||||
<span>上传</span>
|
||||
</div>
|
||||
</div>
|
||||
<u-select v-model="isShowAlbum" :default-value="defaultValue" :list="albumList" @confirm="onConfirm"></u-select>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'Photo',
|
||||
|
||||
appName: '拼图汇报',
|
||||
|
||||
data () {
|
||||
return {
|
||||
img: '',
|
||||
type: '',
|
||||
albumList: [],
|
||||
albumName: '',
|
||||
albumId: '',
|
||||
templateId: '',
|
||||
isShowAlbum: false
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
defaultValue () {
|
||||
if (!this.albumList.length) {
|
||||
return [0]
|
||||
}
|
||||
|
||||
return [this.albumList.map(v => v.value).indexOf(this.albumId)]
|
||||
}
|
||||
},
|
||||
|
||||
onLoad (query) {
|
||||
this.img = query.img
|
||||
this.type = query.type
|
||||
this.templateId = query.templateId
|
||||
|
||||
this.getWatermarkList()
|
||||
},
|
||||
|
||||
methods: {
|
||||
back () {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
|
||||
upload () {
|
||||
this.$loading()
|
||||
this.$http.post('/api/appalbumphoto/addOrUpdate', {
|
||||
albumId: this.albumId,
|
||||
photoUrl: this.img,
|
||||
watermarkType: this.type,
|
||||
templateId: this.templateId
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.$u.toast('新增成功')
|
||||
setTimeout(() => {
|
||||
uni.reLaunch({
|
||||
url: 'AppCountryAlbum'
|
||||
})
|
||||
}, 500)
|
||||
}
|
||||
|
||||
uni.hideLoading()
|
||||
})
|
||||
},
|
||||
|
||||
onConfirm (e) {
|
||||
this.albumId = e[0].value
|
||||
this.albumName = e[0].label
|
||||
},
|
||||
|
||||
getWatermarkList () {
|
||||
this.$http.post('/api/appalbum/list', null, {
|
||||
parmas: {
|
||||
size: 1000
|
||||
}
|
||||
}).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.albumList = res.data.records.map(v => {
|
||||
return {
|
||||
label: v.albumName,
|
||||
value: v.id
|
||||
}
|
||||
})
|
||||
|
||||
this.albumName = this.albumList[0].label
|
||||
this.albumId = this.albumList[0].value
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
preview (url) {
|
||||
uni.previewImage({
|
||||
urls: [url],
|
||||
current: url
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.photo {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
overflow: auto;
|
||||
background: #000;
|
||||
|
||||
.photo-top {
|
||||
display: flex;
|
||||
position: fixed;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 11;
|
||||
width: 100%;
|
||||
height: 128px;
|
||||
padding: 0 32px;
|
||||
background: rgba(0, 0, 0, 0.5);
|
||||
|
||||
& > image {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
}
|
||||
|
||||
& > span {
|
||||
color: #cbcbcb;
|
||||
font-size: 32px;
|
||||
}
|
||||
|
||||
.photo-top__middle {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 336px;
|
||||
height: 72px;
|
||||
line-height: 1;
|
||||
background: #0B111F;
|
||||
border-radius: 40px;
|
||||
font-size: 28px;
|
||||
color: #cbcbcb;
|
||||
|
||||
image {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin-left: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.photo-footer {
|
||||
display: flex;
|
||||
position: fixed;
|
||||
align-items: center;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1;
|
||||
width: 100%;
|
||||
height: 216px;
|
||||
background: #1E1E21;
|
||||
|
||||
.item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
|
||||
image {
|
||||
width: 80px;
|
||||
height: 80px;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 28px;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& > image {
|
||||
width: 100%;
|
||||
min-height: calc(100% - 216px);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -3,16 +3,18 @@
|
||||
<div class="Organize-top">
|
||||
<div>
|
||||
<div class="left">
|
||||
<h2>09</h2>
|
||||
<h2>{{ DD }}</h2>
|
||||
<div class="left-wrapper__right">
|
||||
<h3>2022年2月</h3>
|
||||
<h3>{{ yyyyMM }}</h3>
|
||||
<p>日·数据统计</p>
|
||||
</div>
|
||||
</div>
|
||||
<picker mode="date" :value="date" @change="onDateChange">
|
||||
<div class="right">
|
||||
<image src="../images/qiehuan.png" />
|
||||
<span>切换日期</span>
|
||||
</div>
|
||||
</picker>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info">
|
||||
@@ -24,21 +26,21 @@
|
||||
<div class="info-total__item">
|
||||
<span>未拍照</span>
|
||||
<div class="info-total__item--bottom">
|
||||
<h3>0</h3>
|
||||
<h3>{{ photoTotal.noPhtoto }}</h3>
|
||||
<i>人</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-total__item">
|
||||
<span>已拍照</span>
|
||||
<div class="info-total__item--bottom">
|
||||
<h3>10</h3>
|
||||
<h3>{{ photoTotal.userPhoto }}</h3>
|
||||
<i>人</i>
|
||||
</div>
|
||||
</div>
|
||||
<div class="info-total__item">
|
||||
<span>拍照数</span>
|
||||
<div class="info-total__item--bottom">
|
||||
<h3>30</h3>
|
||||
<h3>{{ photoTotal.allPhoto }}</h3>
|
||||
<i>人</i>
|
||||
</div>
|
||||
</div>
|
||||
@@ -95,15 +97,64 @@
|
||||
|
||||
data () {
|
||||
return {
|
||||
photoTotal: {},
|
||||
date: '',
|
||||
list: []
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
yyyyMM () {
|
||||
if (this.date) {
|
||||
return this.date.substr(0, 8)
|
||||
}
|
||||
|
||||
return ''
|
||||
},
|
||||
|
||||
DD () {
|
||||
if (this.date) {
|
||||
return this.date.substr(8)
|
||||
}
|
||||
|
||||
return ''
|
||||
}
|
||||
},
|
||||
|
||||
onLoad () {
|
||||
|
||||
this.date = this.$dayjs(new Date).format('YYYY年MM月DD')
|
||||
this.getPhotoTotal()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getPhotoTotal () {
|
||||
this.$http.post(`/api/appattendancerecord/punchclocksum?queryTime=${this.date}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.photoTotal = res.data
|
||||
}
|
||||
})
|
||||
|
||||
this.$http.post(`/api/appattendancerecord/alldetail?queryTime=${this.date}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
}
|
||||
})
|
||||
|
||||
this.$http.post(`/api/appattendancerecord/userphotosort?queryTime=${this.date}`).then(res => {
|
||||
if (res.code === 0) {
|
||||
this.list = res.data
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
onDateChange (e) {
|
||||
const values = e.detail.value.split('-')
|
||||
this.date = `${values[0]}年${values[1]}月${values[2]}`
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.getPhotoTotal()
|
||||
})
|
||||
},
|
||||
|
||||
linkTo (url) {
|
||||
uni.navigateTo({
|
||||
url
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
}
|
||||
|
||||
.imgs {
|
||||
margin-top: 2px;
|
||||
margin-top: 20px;
|
||||
image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
@@ -1,36 +1,36 @@
|
||||
<template>
|
||||
<div class="MeetingMminutes" ref="report">
|
||||
<table @click="linkTo" class="table" border="1" cellspacing="0" cellpadding="16px" bordercolor="#2774CE">
|
||||
<tr>
|
||||
<th colspan="4" class="title">会议纪要</th>
|
||||
<tr v-if="isShowTitle">
|
||||
<th colspan="4" class="title">{{ title }}</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap">会议日期</td>
|
||||
<td>2022-01-21 周五</td>
|
||||
<td class="nowrap">天气</td>
|
||||
<td>24℃ 晴</td>
|
||||
<tr v-if="isShowWeather || isShowDate">
|
||||
<td v-if="isShowDate" class="nowrap">会议日期</td>
|
||||
<td colspan="3" v-if="isShowDate">{{ date }}</td>
|
||||
<!-- <td v-if="isShowWeather" class="nowrap">天气</td>
|
||||
<td v-if="isShowWeather">{{ weather }}</td> -->
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-if="isShowTheme">
|
||||
<td class="nowrap">会议主题</td>
|
||||
<td colspan="3">会议主题会议主题会议主题会议主题会议主题</td>
|
||||
<td colspan="3">{{ theme }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="nowrap">主持人</td>
|
||||
<td>鄢然</td>
|
||||
<td class="nowrap">记录人</td>
|
||||
<td>刘烨</td>
|
||||
<tr v-if="isShowRecorder || isShowHoster">
|
||||
<td class="nowrap" v-if="isShowHoster">主持人</td>
|
||||
<td v-if="isShowHoster">{{ hoster }}</td>
|
||||
<td class="nowrap" v-if="isShowRecorder">记录人</td>
|
||||
<td v-if="isShowRecorder">{{ recorder }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-if="isShowAttendee">
|
||||
<td class="nowrap">参与人</td>
|
||||
<td colspan="3">2022-01-21 周五</td>
|
||||
<td colspan="3">{{ attendee }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr v-if="isShowAddress">
|
||||
<td class="nowrap">会议地点</td>
|
||||
<td colspan="3">2022-01-21 周五</td>
|
||||
<td colspan="3">{{ address }}</td>
|
||||
</tr>
|
||||
<tr colspan="2">
|
||||
<tr colspan="2" v-if="isShowRemark">
|
||||
<td class="nowrap">会议内容</td>
|
||||
<td colspan="3">2022-01-21 周五</td>
|
||||
<td colspan="3">{{ remark }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="imgs">
|
||||
@@ -58,18 +58,23 @@
|
||||
data () {
|
||||
return {
|
||||
title: '巡查日志',
|
||||
subTitle: '',
|
||||
reporter: '',
|
||||
date: '',
|
||||
hoster: '',
|
||||
remark: '',
|
||||
address: '',
|
||||
recorder: '',
|
||||
attendee: '',
|
||||
weather: '',
|
||||
theme: '',
|
||||
isShowRecorder: true,
|
||||
isShowAttendee: true,
|
||||
isShowTitle: true,
|
||||
isShowWeather: true,
|
||||
isShowDate: true,
|
||||
isShowReporter: false,
|
||||
isShowAddress: false,
|
||||
isShowRemark: false,
|
||||
isShowTheme: true,
|
||||
isShowAddress: true,
|
||||
isShowRemark: true,
|
||||
isShowHoster: true,
|
||||
imgs: [],
|
||||
configList: []
|
||||
}
|
||||
@@ -80,23 +85,32 @@
|
||||
handler: function (v) {
|
||||
if (v.length) {
|
||||
const title = v.filter(v => v.type === '17')[0]
|
||||
const reporter = v.filter(v => v.type === '24')[0]
|
||||
const date = v.filter(v => v.type === '1')[0]
|
||||
const address = v.filter(v => v.type === '23')[0]
|
||||
const remark = v.filter(v => v.type === '25')[0]
|
||||
const weather = v.filter(v => v.type === '2')[0]
|
||||
const hoster = v.filter(v => v.type === '26')[0]
|
||||
const date = v.filter(v => v.type === '0')[0]
|
||||
const address = v.filter(v => v.type === '29')[0]
|
||||
const remark = v.filter(v => v.type === '31')[0]
|
||||
const theme = v.filter(v => v.type === '30')[0]
|
||||
const attendee = v.filter(v => v.type === '28')[0]
|
||||
const recorder = v.filter(v => v.type === '27')[0]
|
||||
|
||||
console.log(date)
|
||||
|
||||
this.isShowTitle = title.status === '1'
|
||||
this.isShowRemark = remark.status === '1'
|
||||
this.isShowReporter = reporter.status === '1'
|
||||
this.isShowWeather = weather.status === '1'
|
||||
this.isShowRecorder = recorder.status === '1'
|
||||
this.isShowAttendee = attendee.status === '1'
|
||||
this.isShowTheme = theme.status === '1'
|
||||
this.isShowDate = date.status === '1'
|
||||
this.isShowAddress = address.status === '1'
|
||||
|
||||
this.title = title.defaultValue || '巡查日志'
|
||||
this.weather = weather.defaultValue || '晴转多云'
|
||||
this.address = date.defaultValue || '武汉天地'
|
||||
this.reporter = reporter.defaultValue || ''
|
||||
this.address = address.defaultValue || '武汉天地'
|
||||
this.hoster = hoster.defaultValue || ''
|
||||
this.date = date.defaultValue || this.$dayjs(new Date).format('YYYY-MM-DD')
|
||||
this.remark = remark.defaultValue || ''
|
||||
this.theme = theme.defaultValue || ''
|
||||
this.attendee = attendee.defaultValue || ''
|
||||
this.recorder = recorder.defaultValue || ''
|
||||
}
|
||||
},
|
||||
deep: true
|
||||
@@ -154,7 +168,7 @@
|
||||
background: #fff;
|
||||
|
||||
.imgs {
|
||||
margin-top: 2px;
|
||||
margin-top: 20px;
|
||||
image {
|
||||
display: block;
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user