xy 9 months ago
parent fbdbaa1def
commit 21b38ba58d

@ -8,11 +8,11 @@
type="daterange"
size="small"
value-format="yyyy-MM-dd"
clearable
style="width: 260px;"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期">
end-placeholder="结束日期"
@input="e => (e && e.length === 2) ? (select.start_date = e[0],select.end_date = e[1]) : (select.start_date = '',select.end_date = '')">
</el-date-picker>
<el-button icon="el-icon-search" type="primary" plain size="small" style="margin-left: 6px;" @click="getList"></el-button>
</template>
@ -128,6 +128,28 @@
</template>
</vxe-column>
</vxe-table>
<el-pagination
style="margin-top: 10px"
@size-change="
(e) => {
select.page_size = e;
select.page = 1;
getList();
}
"
@current-change="
(e) => {
select.page = e;
getList();
}
"
:current-page.sync="select.page"
:page-sizes="[10, 20, 30, 50, 100]"
:page-size.sync="select.page_size"
layout="total, sizes, prev, pager, next, jumper"
:total="total"
></el-pagination>
</card-container>
</div>
</template>
@ -151,7 +173,7 @@ export default {
tableData: [],
select: {
page: 1,
page_size: 9999,
page_size: 10,
start_date: this.$moment().subtract(1, 'months').format('YYYY-MM-DD'),
end_date: this.$moment().add(1, 'months').format('YYYY-MM-DD')
},

@ -3,9 +3,14 @@
<CardContainer>
<div>
<el-button v-if="isShowDuty" type="primary" style="display: block;margin: auto auto 20px;" @click="startDuty"></el-button>
<button class="sign-btn" @click="clockIn">
<span>{{ isOutSign ? ' 外勤' : '' }}打卡</span>
</button>
<div style="display: flex;">
<button class="sign-btn" v-if="signStatus === 1 || signStatus === 2" @click="clockIn(false)">
<span>打卡</span>
</button>
<button class="sign-btn" v-if="signStatus === 2 || signStatus === 0" @click="clockIn(true)">
<span>外勤打卡</span>
</button>
</div>
<div class="sign-info">
<div class="sign-statue">
<div>打卡状态 <el-tag size="small" effect="dark" type="primary">{{ (isGetLocation || isIpSign) ? (isOutSign ? '外勤打卡' : '可打卡') : '不可打卡' }}</el-tag></div>
@ -86,6 +91,7 @@ export default {
return {
uploadSize,
isInUni: false,
signStatus: 0,
// start
loading: false,
action: process.env.VUE_APP_UPLOAD_API,
@ -160,7 +166,8 @@ export default {
if (this.isIpSign) {
const res = await signIp({
image_id: this.imageId,
remark: this.remark
remark: this.remark,
status: 3
})
} else {
const res = await sign({
@ -180,7 +187,7 @@ export default {
this.loading = false
}
}, 1000, true),
clockIn: throttle(async function() {
clockIn: throttle(async function(isOut=true) {
try {
if (!this.isInUni && !this.isIpSign) {
await this.getLocation()
@ -195,12 +202,14 @@ export default {
return
}
if(!this.isGetLocation && !this.isIpSign) return
if(this.isOutSign) {
if(isOut) {
this.isShow = true
return
}
if (this.isIpSign) {
const res = await signIp()
const res = await signIp({
status: 1
})
} else {
const res = await sign({
location: `${this.pos.lng},${this.pos.lat}`,
@ -262,10 +271,12 @@ export default {
async preIp() {
try {
const res = await preIp()
this.isOutSign = false
const { result } = await preIp()
this.signStatus = result
// this.isOutSign = false
} catch (err) {
this.isOutSign = true
// this.isOutSign = true
}
},
async pos2Address(lat, lng) {

@ -77,15 +77,15 @@
@click="getList(true)"
>搜索</el-button
>
<el-button
v-if="$route.path === '/flow/list/todo'"
icon="el-icon-edit"
type="primary"
size="small"
plain
@click="multiDeal"
>批量审批</el-button
>
<!-- <el-button-->
<!-- v-if="$route.path === '/flow/list/todo'"-->
<!-- icon="el-icon-edit"-->
<!-- type="primary"-->
<!-- size="small"-->
<!-- plain-->
<!-- @click="multiDeal"-->
<!-- >批量审批</el-button-->
<!-- >-->
</div>
</template>
</vxe-toolbar>
@ -386,7 +386,7 @@ import moment from "moment/moment";
import ListPopover from "./components/ListPopover.vue";
import MultiDeal from "./components/MultiDeal.vue"
import share from "./components/share.vue";
import {index as departmentIndex} from "@/api/department";
import { departmentListNoAuth } from "@/api/common"
export default {
name: "flowList",
components: {
@ -512,7 +512,7 @@ export default {
methods: {
async getDepartments() {
try {
this.departments = await departmentIndex({
this.departments = await departmentListNoAuth({
page: 1,
page_size: 9999
})

Loading…
Cancel
Save