|
|
|
@ -170,23 +170,34 @@
|
|
|
|
<div class="mycard flow">
|
|
|
|
<div class="mycard flow">
|
|
|
|
<div class="mycard__title">
|
|
|
|
<div class="mycard__title">
|
|
|
|
<span>常用流程</span>
|
|
|
|
<span>常用流程</span>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
|
|
|
|
<el-button
|
|
|
|
|
|
|
|
size="mini"
|
|
|
|
|
|
|
|
type="primary"
|
|
|
|
|
|
|
|
style="padding: 5px 10px"
|
|
|
|
|
|
|
|
@click="openQucik"
|
|
|
|
|
|
|
|
>批量更改</el-button>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<div class="mycard__body flow__body">
|
|
|
|
<div class="mycard__body flow__body">
|
|
|
|
<div
|
|
|
|
<!-- 自己的 常用流程 -->
|
|
|
|
v-for="item in usualFlows"
|
|
|
|
<div
|
|
|
|
:key="item.key"
|
|
|
|
v-for="item in usualFlows"
|
|
|
|
@click="toCreate(item)">
|
|
|
|
:key="item.key"
|
|
|
|
<div class="flow-cover">
|
|
|
|
@click="toCreate(item)">
|
|
|
|
<template v-if="item.icon">
|
|
|
|
<div class="flow-cover">
|
|
|
|
<Icon class="flow__body--icon" :icon="item.icon"></Icon>
|
|
|
|
<template v-if="item.icon">
|
|
|
|
</template>
|
|
|
|
<Icon class="flow__body--icon" :icon="item.icon"></Icon>
|
|
|
|
<template v-else>
|
|
|
|
</template>
|
|
|
|
<i class="el-icon-edit flow__body--icon"></i>
|
|
|
|
<template v-else>
|
|
|
|
</template>
|
|
|
|
<i class="el-icon-edit flow__body--icon"></i>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<span class="flow__body--name">{{item.name}}
|
|
|
|
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<span class="flow__body--name">{{ item.name }}</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
@ -285,6 +296,48 @@
|
|
|
|
frameborder="0"
|
|
|
|
frameborder="0"
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
</vxe-modal>
|
|
|
|
</vxe-modal>
|
|
|
|
|
|
|
|
<!-- 编辑菜单 -->
|
|
|
|
|
|
|
|
<vxe-modal
|
|
|
|
|
|
|
|
v-model="isShowQuick"
|
|
|
|
|
|
|
|
:z-index="zIndex"
|
|
|
|
|
|
|
|
transfer
|
|
|
|
|
|
|
|
show-zoom
|
|
|
|
|
|
|
|
resize
|
|
|
|
|
|
|
|
show-footer
|
|
|
|
|
|
|
|
show-confirm-button
|
|
|
|
|
|
|
|
show-cancel-button
|
|
|
|
|
|
|
|
type="confirm"
|
|
|
|
|
|
|
|
:fullscreen="$store.getters.device === 'mobile'"
|
|
|
|
|
|
|
|
title="常用流程"
|
|
|
|
|
|
|
|
:width="defaultModalSize.width"
|
|
|
|
|
|
|
|
:height="defaultModalSize.height"
|
|
|
|
|
|
|
|
esc-closable
|
|
|
|
|
|
|
|
:padding="false"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<div class="mycard flow dashboard-container">
|
|
|
|
|
|
|
|
<div class="mycard__body flow__body" style="width: 100%;grid-template-columns: repeat(6, 1fr);">
|
|
|
|
|
|
|
|
<div
|
|
|
|
|
|
|
|
v-for="item in flows"
|
|
|
|
|
|
|
|
:key="item.key"
|
|
|
|
|
|
|
|
@click="changeCheck(item)">
|
|
|
|
|
|
|
|
<div class="flow-cover">
|
|
|
|
|
|
|
|
<template v-if="item.icon">
|
|
|
|
|
|
|
|
<Icon class="flow__body--icon" :icon="item.icon"></Icon>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template v-else>
|
|
|
|
|
|
|
|
<i class="el-icon-edit flow__body--icon"></i>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<span class="flow__body--name">
|
|
|
|
|
|
|
|
<el-checkbox @change="(e)=>{return changeCheck(item,e)}" v-model="item.checked">{{ item.name }}</el-checkbox>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<template #footer>
|
|
|
|
|
|
|
|
<el-button type="primary" :loading="quickLoading" @click="updatequick">确认</el-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</vxe-modal>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
@ -299,6 +352,9 @@ import { index as configIndex } from "@/api/config";
|
|
|
|
import { index } from "@/api/attendance";
|
|
|
|
import { index } from "@/api/attendance";
|
|
|
|
import {isExternal} from "@/utils/validate";
|
|
|
|
import {isExternal} from "@/utils/validate";
|
|
|
|
import { defaultModalSize } from "@/settings";
|
|
|
|
import { defaultModalSize } from "@/settings";
|
|
|
|
|
|
|
|
import {saveMyself} from "@/api/user"
|
|
|
|
|
|
|
|
import {getInfo} from "@/api/me"
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "Dashboard",
|
|
|
|
name: "Dashboard",
|
|
|
|
components: {
|
|
|
|
components: {
|
|
|
|
@ -310,7 +366,8 @@ export default {
|
|
|
|
modalUrl: "",
|
|
|
|
modalUrl: "",
|
|
|
|
zIndex: PopupManager.nextZIndex(),
|
|
|
|
zIndex: PopupManager.nextZIndex(),
|
|
|
|
isShowModal: false,
|
|
|
|
isShowModal: false,
|
|
|
|
|
|
|
|
isShowQuick:false,
|
|
|
|
|
|
|
|
quickLoading:false,
|
|
|
|
weatherIcon: new Map([
|
|
|
|
weatherIcon: new Map([
|
|
|
|
["晴", "el-icon-sunny"],
|
|
|
|
["晴", "el-icon-sunny"],
|
|
|
|
["阴", "el-icon-cloudy"],
|
|
|
|
["阴", "el-icon-cloudy"],
|
|
|
|
@ -436,22 +493,29 @@ export default {
|
|
|
|
console.error(err);
|
|
|
|
console.error(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 快捷菜单
|
|
|
|
|
|
|
|
changeCheck(item){
|
|
|
|
|
|
|
|
this.$set(item,'checked',!item.checked)
|
|
|
|
|
|
|
|
this.$forceUpdate()
|
|
|
|
|
|
|
|
},
|
|
|
|
async getUsualFlows() {
|
|
|
|
async getUsualFlows() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
await this.getFlows();
|
|
|
|
await this.getFlows();
|
|
|
|
const res = await configIndex({
|
|
|
|
const res = await getInfo()
|
|
|
|
filter: [
|
|
|
|
this.usualFlows = res.quick_enter?res.quick_enter:[]
|
|
|
|
{
|
|
|
|
// const res = await configIndex({
|
|
|
|
key: "key",
|
|
|
|
// filter: [
|
|
|
|
op: "eq",
|
|
|
|
// {
|
|
|
|
value: "dashboard_menus",
|
|
|
|
// key: "key",
|
|
|
|
},
|
|
|
|
// op: "eq",
|
|
|
|
],
|
|
|
|
// value: "dashboard_menus",
|
|
|
|
});
|
|
|
|
// },
|
|
|
|
this.usualFlows = this.flows.filter(
|
|
|
|
// ],
|
|
|
|
(i) => res.data[0]?.value?.indexOf(i.id.toString()) !== -1
|
|
|
|
// });
|
|
|
|
);
|
|
|
|
// this.usualFlows = this.flows.filter(
|
|
|
|
console.log(this.usualFlows);
|
|
|
|
// (i) => res.data[0]?.value?.indexOf(i.id.toString()) !== -1
|
|
|
|
|
|
|
|
// );
|
|
|
|
|
|
|
|
console.log(res,this.usualFlows);
|
|
|
|
} catch (err) {
|
|
|
|
} catch (err) {
|
|
|
|
console.error(err);
|
|
|
|
console.error(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -464,6 +528,29 @@ export default {
|
|
|
|
console.error(err);
|
|
|
|
console.error(err);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
openQucik(){
|
|
|
|
|
|
|
|
this.flows.map(flow => {
|
|
|
|
|
|
|
|
const isChecked = this.usualFlows.some(usualFlow => usualFlow.id === flow.id);
|
|
|
|
|
|
|
|
flow.checked = isChecked
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
this.isShowQuick = true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
updatequick(){
|
|
|
|
|
|
|
|
this.quickLoading = true
|
|
|
|
|
|
|
|
let arr = this.flows.filter((i)=> i.checked===true)
|
|
|
|
|
|
|
|
saveMyself({
|
|
|
|
|
|
|
|
quick_enter:arr
|
|
|
|
|
|
|
|
}).then(res=>{
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
type: 'success',
|
|
|
|
|
|
|
|
message: '更改成功!'
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
this.isShowQuick = false
|
|
|
|
|
|
|
|
this.quickLoading = false
|
|
|
|
|
|
|
|
this.getUsualFlows()
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
async getTotal() {
|
|
|
|
async getTotal() {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
const res = await axios.get(`${process.env.VUE_APP_BASE_API}/api/oa/statistics/notifications`,{
|
|
|
|
const res = await axios.get(`${process.env.VUE_APP_BASE_API}/api/oa/statistics/notifications`,{
|
|
|
|
@ -667,6 +754,9 @@ $btn-colors: linear-gradient(90deg, #d4bbfd 0%, #af7bff 100%),
|
|
|
|
font-weight: bold;
|
|
|
|
font-weight: bold;
|
|
|
|
padding-left: 20px;
|
|
|
|
padding-left: 20px;
|
|
|
|
position: relative;
|
|
|
|
position: relative;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
|
|
|
align-items: center;
|
|
|
|
|
|
|
|
|
|
|
|
&::before {
|
|
|
|
&::before {
|
|
|
|
content: "";
|
|
|
|
content: "";
|
|
|
|
@ -815,6 +905,8 @@ $btn-colors: linear-gradient(90deg, #d4bbfd 0%, #af7bff 100%),
|
|
|
|
font-size: 14px;
|
|
|
|
font-size: 14px;
|
|
|
|
padding-top: 20px;
|
|
|
|
padding-top: 20px;
|
|
|
|
text-align: center;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
|
|
height: 40px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|