签到完成
This commit is contained in:
@@ -3,31 +3,48 @@
|
|||||||
<ai-list>
|
<ai-list>
|
||||||
<ai-title slot="title" title="签到管理" isShowBottomBorder>
|
<ai-title slot="title" title="签到管理" isShowBottomBorder>
|
||||||
<template #rightBtn>
|
<template #rightBtn>
|
||||||
<el-button type="primary">设置</el-button>
|
<div flex>
|
||||||
|
<ai-download url="/app/appwechatsigninfo/export" :params="{...search}" :instance="instance" fileName="签到管理导出文件"/>
|
||||||
|
<ai-dialog-btn dialogTitle="签到提醒设置" width="500px" :submit="submit" @close="form={}" @open="getSetting">
|
||||||
|
<el-button slot="btn" type="primary">设置</el-button>
|
||||||
|
<el-form size="small" label-width="120px" ref="SettingForm" :model="form">
|
||||||
|
<el-form-item label="早提醒时间">
|
||||||
|
<el-time-picker v-model="form.morningTime" placeholder="请选择" value-format="hh:mm:ss"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="晚提醒时间">
|
||||||
|
<el-time-picker v-model="form.nightTime" placeholder="请选择" value-format="hh:mm:ss"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</ai-dialog-btn>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</ai-title>
|
</ai-title>
|
||||||
<template #left>
|
<template #left>
|
||||||
<ai-tree-menu title="组织部门" @search="handleSearchTree">
|
<ai-tree-menu title="组织部门" @search="handleSearchTree">
|
||||||
<el-tree ref="DeptTree" :data="treeData" :props="{label:'name'}" :filter-node-method="(v,data)=>data.label.indexOf(v)>-1"/>
|
<el-tree ref="DeptTree" :data="treeData" :props="{label:'name'}" :filter-node-method="(v,data)=>data.name.indexOf(v)>-1"
|
||||||
|
@node-click="handleSelectDept"/>
|
||||||
</ai-tree-menu>
|
</ai-tree-menu>
|
||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #blank>
|
||||||
|
<div flex class="gap-16">
|
||||||
|
<ai-bar v-for="(v,key) in sta" card class="fill" :title="key"><b class="staNum" v-text="v"/></ai-bar>
|
||||||
|
</div>
|
||||||
|
<ai-card panel>
|
||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template #left>
|
<template #left>
|
||||||
<ai-download url="/app/appwechatsigninfo/export" :params="{...search,ids}" :instance="instance" fileName="签到管理导出文件"/>
|
<ai-search label="签到时间">
|
||||||
|
<el-date-picker v-model="search.createDateStart" size="small" placeholder="开始时间" value-format="yyyy-MM-dd" @change="reloadTable"/>
|
||||||
|
<el-date-picker v-model="search.createDateEnd" size="small" placeholder="结束时间" value-format="yyyy-MM-dd" @change="reloadTable"/>
|
||||||
|
</ai-search>
|
||||||
|
<ai-select placeholder="签到状态" v-model="search.status" :selectList="dict.getDict('wxSignStatus')" @change="reloadTable"/>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-input size="small" placeholder="搜索" v-model="search.name" clearable @change="page.current=1,getTableData()"/>
|
<el-input size="small" placeholder="搜索用户" v-model="search.wxUserName" clearable @change="page.current=1,getTableData()"/>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
<ai-table :tableData="tableData" :total="page.total" :current.sync="page.current" :size.sync="page.size"
|
||||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
|
@getList="getTableData" :col-configs="colConfigs" :dict="dict"/>
|
||||||
<el-table-column slot="options" label="操作" fixed="right" align="center" width="300">
|
</ai-card>
|
||||||
<template slot-scope="{row}">
|
|
||||||
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</ai-table>
|
|
||||||
</template>
|
</template>
|
||||||
</ai-list>
|
</ai-list>
|
||||||
</section>
|
</section>
|
||||||
@@ -46,16 +63,19 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
search: {name: ""},
|
search: {name: "", createDateStart: "", createDateEnd: ""},
|
||||||
page: {current: 1, size: 10, total: 0},
|
page: {current: 1, size: 10, total: 0},
|
||||||
tableData: [],
|
tableData: [],
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{prop: "createDate", label: "签到时间"},
|
{prop: "wxUserName", label: "用户"},
|
||||||
{prop: "departmentName", label: "部门"},
|
{prop: "departmentName", label: "部门"},
|
||||||
{prop: "status", label: "状态", dict: "wxSignStatus"},
|
{prop: "createDate", label: "签到日期"},
|
||||||
{prop: "wxUserName", label: "用户"}
|
{prop: "createTime", label: "签到时间"},
|
||||||
|
{prop: "status", label: "状态", dict: "wxSignStatus"}
|
||||||
],
|
],
|
||||||
treeData: []
|
treeData: [],
|
||||||
|
form: {},
|
||||||
|
sta: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -69,9 +89,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleAdd(id) {
|
|
||||||
this.$router.push({hash: "#add", query: {id}})
|
|
||||||
},
|
|
||||||
getDepartments() {
|
getDepartments() {
|
||||||
this.instance.post("/app/wxcp/wxdepartment/listAll").then(res => {
|
this.instance.post("/app/wxcp/wxdepartment/listAll").then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
@@ -79,13 +96,49 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getSetting() {
|
||||||
|
this.instance.post("/app/appwechatsignconfig/queryDetailById").then(res => {
|
||||||
|
if (res?.data) {
|
||||||
|
this.form = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
getStaData() {
|
||||||
|
const {departmentId} = this.search
|
||||||
|
this.instance.post("/app/appwechatsigninfo/querySignStatistic", null, {
|
||||||
|
params: {departmentId}
|
||||||
|
}).then(res => {
|
||||||
|
if (res?.data) {
|
||||||
|
this.sta = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
handleSearchTree(name) {
|
handleSearchTree(name) {
|
||||||
this.$refs.DeptTree.filter(name)
|
this.$refs.DeptTree.filter(name)
|
||||||
|
},
|
||||||
|
reloadTable() {
|
||||||
|
this.page.current = 1
|
||||||
|
this.getTableData()
|
||||||
|
},
|
||||||
|
handleSelectDept(data) {
|
||||||
|
this.search.departmentId = data.id
|
||||||
|
this.reloadTable()
|
||||||
|
this.getStaData()
|
||||||
|
},
|
||||||
|
submit() {
|
||||||
|
return this.$refs.SettingForm.validate()
|
||||||
|
.then(() => this.instance.post("/app/appwechatsignconfig/addOrUpdate", this.form))
|
||||||
|
.then(res => {
|
||||||
|
if (res?.code == 0) {
|
||||||
|
return this.$message.success("提交成功")
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getTableData()
|
this.getTableData()
|
||||||
this.getDepartments()
|
this.getDepartments()
|
||||||
|
this.getStaData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -93,5 +146,9 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.list {
|
.list {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|
||||||
|
.staNum {
|
||||||
|
font-size: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -17,13 +17,12 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts';
|
|||||||
/**
|
/**
|
||||||
常用内外边距样式
|
常用内外边距样式
|
||||||
*/
|
*/
|
||||||
@each $padMar, $pm in (mar:margin, pad:padding) {
|
|
||||||
@each $v in (8, 10, 16, 20, 32, 48, 56, 64, 80) {
|
@each $v in (8, 10, 16, 20, 32, 48, 56, 64, 80) {
|
||||||
@each $pos, $p in (l:left, r:right, t:top, b:bottom) {
|
//gap
|
||||||
.#{$padMar}-#{$pos+$v} {
|
.gap-#{$v} {
|
||||||
#{$pm}-#{$p}: #{$v}px
|
gap: #{$v}px
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@each $padMar, $pm in (mar:margin, pad:padding) {
|
||||||
.#{$padMar}-#{$v} {
|
.#{$padMar}-#{$v} {
|
||||||
#{$pm}: #{$v}px
|
#{$pm}: #{$v}px
|
||||||
}
|
}
|
||||||
@@ -37,6 +36,11 @@ $--font-path: '~element-ui/lib/theme-chalk/fonts';
|
|||||||
#{$pm}-left: #{$v}px;
|
#{$pm}-left: #{$v}px;
|
||||||
#{$pm}-right: #{$v}px;
|
#{$pm}-right: #{$v}px;
|
||||||
}
|
}
|
||||||
|
@each $pos, $p in (l:left, r:right, t:top, b:bottom) {
|
||||||
|
.#{$padMar}-#{$pos+$v} {
|
||||||
|
#{$pm}-#{$p}: #{$v}px
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,12 +1,13 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="aibar" :style="{ marginBottom: marginBottom }" :class="[titlePosition === 'center' ? 'aibar-center' : '']">
|
<div class="aibar" :style="{ marginBottom }" :class="{'aibar-cente':titlePosition === 'center',card}">
|
||||||
<div v-if="titlePosition === 'center'"></div>
|
<div v-if="titlePosition === 'center'"/>
|
||||||
<div class="aibar-left" :class="[titlePosition === 'center' ? 'aibar-left__center' : '']">
|
<div class="aibar-left" :class="[titlePosition === 'center' ? 'aibar-left__center' : '']">
|
||||||
<template v-if="!isHasTitleSlot">{{ title }}</template>
|
<template v-if="!$scopedSlots.title">{{ title }}</template>
|
||||||
<slot name="title" v-else></slot>
|
<slot name="title" v-else></slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="aibar-right">
|
<div class="aibar-right">
|
||||||
<slot name="right"></slot>
|
<slot v-if="$scopedSlots.right" name="right"/>
|
||||||
|
<slot/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -33,19 +34,9 @@
|
|||||||
titlePosition: {
|
titlePosition: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'left'
|
default: 'left'
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
card: Boolean
|
||||||
computed: {
|
|
||||||
isHasTitleSlot () {
|
|
||||||
return this.$slots.title
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
|
||||||
return {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
@@ -59,6 +50,11 @@
|
|||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border-bottom: 1px solid #EEEEEE;
|
border-bottom: 1px solid #EEEEEE;
|
||||||
|
box-shadow: 0 4px 6px -2px rgba(15, 15, 21, 0.15);
|
||||||
|
|
||||||
|
&.card {
|
||||||
|
background: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
.aibar-left {
|
.aibar-left {
|
||||||
color: #222;
|
color: #222;
|
||||||
|
|||||||
@@ -94,10 +94,12 @@
|
|||||||
onCancel() {
|
onCancel() {
|
||||||
this.$emit('update:visible', false)
|
this.$emit('update:visible', false)
|
||||||
this.$emit('onCancel')
|
this.$emit('onCancel')
|
||||||
|
this.$emit('cancel')
|
||||||
},
|
},
|
||||||
|
|
||||||
onConfirm() {
|
onConfirm() {
|
||||||
this.$emit('onConfirm')
|
this.$emit('onConfirm')
|
||||||
|
this.$emit('confirm')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="ai-card">
|
<section class="ai-card" :class="{panel}">
|
||||||
<ai-bar v-if="!hideTitle" :title="title" v-bind="$attrs">
|
<ai-bar v-if="!hideHeader" :title="title" v-bind="$attrs">
|
||||||
<template #title>
|
<template #title>
|
||||||
<slot name="title"></slot>
|
<slot name="title"></slot>
|
||||||
</template>
|
</template>
|
||||||
@@ -9,7 +9,8 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-bar>
|
</ai-bar>
|
||||||
<div class="ai-card__body">
|
<div class="ai-card__body">
|
||||||
<slot name="content"></slot>
|
<slot v-if="$scopedSlots.content" name="content"/>
|
||||||
|
<slot v-else/>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
@@ -21,7 +22,11 @@ export default {
|
|||||||
title: {
|
title: {
|
||||||
type: String
|
type: String
|
||||||
},
|
},
|
||||||
hideTitle: Boolean
|
hideTitle: Boolean,
|
||||||
|
panel: Boolean
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
hideHeader: v => v.hideTitle || v.panel
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
@@ -37,5 +42,15 @@ export default {
|
|||||||
.ai-card__body {
|
.ai-card__body {
|
||||||
padding: 12px 40px 22px;
|
padding: 12px 40px 22px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.panel {
|
||||||
|
margin-bottom: 0;
|
||||||
|
|
||||||
|
.ai-card__body {
|
||||||
|
padding: 12px 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
<slot v-if="$scopedSlots.btn" name="btn"/>
|
<slot v-if="$scopedSlots.btn" name="btn"/>
|
||||||
<el-button v-else type="text">{{ text }}</el-button>
|
<el-button v-else type="text">{{ text }}</el-button>
|
||||||
</div>
|
</div>
|
||||||
<ai-dialog :visible.sync="dialog" :title="dialogTitle" :width="width" :customFooter="customFooter" v-on="$listeners"
|
<ai-dialog :visible.sync="dialog" :title="dialogTitle" :width="width" :customFooter="needFooter" v-on="$listeners"
|
||||||
@onConfirm="dialog=false,$emit('onConfirm')" v-bind="$attrs">
|
@onConfirm="handleConfirm" v-bind="$attrs">
|
||||||
<slot/>
|
<slot/>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button @click="dialog=false">关闭</el-button>
|
<el-button @click="dialog=false">关闭</el-button>
|
||||||
@@ -21,12 +21,26 @@ export default {
|
|||||||
text: {default: "点击弹窗"},
|
text: {default: "点击弹窗"},
|
||||||
dialogTitle: {default: "展示信息"},
|
dialogTitle: {default: "展示信息"},
|
||||||
customFooter: {default: true},
|
customFooter: {default: true},
|
||||||
width: {default: "1200px"}
|
width: {default: "1200px"},
|
||||||
|
submit: {default: null}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
needFooter: v => v.customFooter && !v.submit
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dialog: false
|
dialog: false
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleConfirm() {
|
||||||
|
if (!this.submit) {
|
||||||
|
this.dialog = false
|
||||||
|
this.$emit('onConfirm')
|
||||||
|
} else {
|
||||||
|
this.submit?.()?.then(() => this.dialog = false)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -6,9 +6,14 @@
|
|||||||
<div class="ai-list__tabs" v-if="$slots.tabs">
|
<div class="ai-list__tabs" v-if="$slots.tabs">
|
||||||
<slot name="tabs"></slot>
|
<slot name="tabs"></slot>
|
||||||
</div>
|
</div>
|
||||||
<div class="ai-list__blank" v-else-if="$slots.blank">
|
<el-row type="flex" class="ai-list__blank" v-else-if="$scopedSlots.blank" :class="{hasLeft:$scopedSlots.left}">
|
||||||
|
<div class="ai-list__content--left" v-if="$scopedSlots.left">
|
||||||
|
<slot name="left"/>
|
||||||
|
</div>
|
||||||
|
<div class="fill">
|
||||||
<slot name="blank"/>
|
<slot name="blank"/>
|
||||||
</div>
|
</div>
|
||||||
|
</el-row>
|
||||||
<div class="ai-list__content" v-else :class="contentClass">
|
<div class="ai-list__content" v-else :class="contentClass">
|
||||||
<div class="ai-list__content--wrapper">
|
<div class="ai-list__content--wrapper">
|
||||||
<slot name="custom" v-if="!!$slots.custom"/>
|
<slot name="custom" v-if="!!$slots.custom"/>
|
||||||
@@ -222,9 +227,19 @@ export default {
|
|||||||
flex: 1;
|
flex: 1;
|
||||||
padding: 16px;
|
padding: 16px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
|
height: calc(100% - 50px);
|
||||||
|
|
||||||
|
|
||||||
|
&.hasLeft {
|
||||||
|
padding: 16px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
& > .fill {
|
||||||
|
height: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.ai-left__list {
|
.ai-left__list {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
|||||||
Reference in New Issue
Block a user