| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511 |
- <template>
- <div>
- <el-row>
- <el-col :span="24">
- <basic-container v-if="permission.home_front">
- <avue-data-rotate :option="optionFront"></avue-data-rotate>
- </basic-container>
- <basic-container v-if="permission.home_quick_menu || permission.home_manage">
- <el-collapse v-model="activeNames" @change="handleChange">
- <div v-if="permission.home_quick_menu">
- <el-row v-for="(item1, index1) in menus" :key="item1.id">
- <el-collapse-item :title="item1.name" :name="index1" >
- <el-col :span="8" v-for="(item2, index2) in item1.children" :key="item2.id">
- <el-button type="primary" plain @click="$router.push({path: item2.path})">{{item2.name}}</el-button>
- </el-col>
- </el-collapse-item>
- </el-row>
- </div>
- <div v-if="permission.home_manage">
- <el-select v-model="selectOrgNo" filterable placeholder="請選擇" style="position: absolute;left: 400px;margin-top: 5px;" @change="selectDept">
- <el-option
- v-for="item in deptList"
- :key="item.orgNo"
- :label="item.deptName"
- :value="item.orgNo">
- </el-option>
- </el-select>
- <el-collapse-item title="每日、每周、每月待辦事項" :name="5">
- <el-col :span="8" >
- <avue-crud
- :option="optionDay"
- :data="dataDay"
- :page.sync="pageDay"
- v-model="form"
- ref="crud"
- >
- <template slot="status" slot-scope="{row, index}">
- <div align="center">
- <i v-if="row.checked > 0" style="width:20px;height:20px;border-radius:50%;background-color:green;display: block"></i>
- <i v-if="!row.checked > 0" style="width:20px;height:20px;border-radius:50%;background-color:red;display: block"></i>
- </div>
- </template>
- </avue-crud>
- </el-col>
- <el-col :span="8" >
- <avue-crud
- :option="optionWeek"
- :data="dataWeek"
- :page.sync="pageWeek"
- v-model="form"
- ref="crud"
- >
- <template slot="status" slot-scope="{row, index}">
- <div align="center">
- <i v-if="row.checked > 0" style="width:20px;height:20px;border-radius:50%;background-color:green;display: block"></i>
- <i v-if="!row.checked > 0" style="width:20px;height:20px;border-radius:50%;background-color:red;display: block"></i>
- </div>
- </template>
- </avue-crud>
- </el-col>
- <el-col :span="8" >
- <avue-crud
- :option="optionMonth"
- :data="dataMonth"
- :page.sync="pageMonth"
- v-model="form"
- ref="crud"
- >
- <template slot="status" slot-scope="{row, index}">
- <div align="center">
- <i v-if="row.checked > 0" style="width:20px;height:20px;border-radius:50%;background-color:green;display: block"></i>
- <i v-if="!row.checked > 0" style="width:20px;height:20px;border-radius:50%;background-color:red;display: block"></i>
- </div>
- </template>
- </avue-crud>
- </el-col>
- </el-collapse-item>
- </div>
- </el-collapse>
- </basic-container>
- <basic-container v-if="permission.home_backgr">
- <avue-data-rotate :option="optionBackgr"></avue-data-rotate>
- </basic-container>
- </el-col>
- </el-row>
- </div>
- </template>
- <script>
- import {mapGetters} from "vuex";
- import {getMyInitiated, getToBoReleased, getToBeConfirmed, getMyConfirmation} from "@/api/bank/home";
- import {getHomeCount, getReport} from "../../api/bank/home";
- import {getList} from "@/api/bank/checklist";
- import {getTopMenu, getRoutes} from '@/api/system/menu'
- import {getChildsDept, getDeptTree, getTree} from "../../api/system/dept";
- export default {
- name: "wel",
- data() {
- return {
- activeNames: [0,1,2,3,4,5],
- selectOrgNo: '',
- deptList: [],
- menus: [],
- initiatedCount: 0,
- releaseCount: 0,
- tobeconfirmCount: 0,
- confirmedCount: 0,
- optionFront: {
- span: 8,
- data: [
- {
- click: (item) => {
- this.$router.push({path: "/desk/initiated"})
- },
- count: 0,
- title: '我的發起',
- icon: 'el-icon-warning',
- color: '#409eff'
- }, {
- click: (item) => {
- this.$router.push({path: "/desk/tobeconfirm"})
- },
- count: '53%',
- title: '待處理',
- display: false,
- icon: 'el-icon-view',
- color: '#f39c12'
- }, {
- click: (item) => {
- this.$router.push({path: "/desk/confirmed"})
- },
- count: '0',
- title: '已處理',
- icon: 'el-icon-setting',
- color: '#5daf34'
- }
- ]
- },
- optionManage: {
- span: 8,
- data: [
- {
- click: (item) => {
- // this.$router.push({path: "/desk/initiated"})
- alert("待开发");
- },
- count: 0,
- title: '每日',
- icon: 'el-icon-warning',
- color: 'rgb(49, 180, 141)'
- }, {
- click: function (item) {
- // alert(JSON.stringify(item));
- alert("待开发");
- },
- count: '0',
- title: '每週',
- icon: 'el-icon-view',
- color: '#00a65a'
- }, {
- click: function (item) {
- // alert(JSON.stringify(item));
- alert("待开发");
- },
- count: '0',
- title: '每月',
- display: false,
- icon: 'el-icon-view',
- color: '#00a65a'
- }
- ]
- },
- optionBackgr: {
- span: 8,
- data: [
- /*{
- click: (item) => {
- this.$router.push({path: "/bank/checklist"})
- },
- count: '0/0',
- title: '每日',
- icon: 'el-icon-warning',
- color: 'rgb(49, 180, 141)'
- }, {
- click: (item) => {
- this.$router.push({path: "/bank/checklist"})
- },
- count: '0/0',
- title: '每週',
- icon: 'el-icon-view',
- color: '#00a65a'
- }, {
- click: (item) => {
- this.$router.push({path: "/bank/checklist"})
- },
- count: '0/0',
- title: '每月',
- display: false,
- icon: 'el-icon-view',
- color: '#00a65a'
- },*/
- {
- click: (item) => {
- this.$router.push({path: "/desk/tobeconfirm"})
- },
- count: '0',
- title: '待處理',
- icon: 'el-icon-setting',
- color: '#f39c12'
- },{
- click: (item) => {
- this.$router.push({path: "/desk/initiated"})
- },
- count: 0,
- title: '我的發起',
- icon: 'el-icon-warning',
- color: '#409eff'
- }, {
- click: (item) => {
- this.$router.push({path: "/desk/toberelease"})
- },
- count: '0',
- title: '待發佈',
- display: false,
- icon: 'el-icon-view',
- color: '#00a65a'
- }
- ]
- },
- form: {},
- dataDay: [],
- pageDay: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- optionDay: {
- card: true,
- menu: false,
- align: 'center',
- header: false,
- column: [
- {
- label: "每日核對項目",
- prop: "item",
- type: "select",
- dicUrl: "/api/blade-system/dict/dictionary?code=check_item",
- props:{
- label: "dictValue",
- value: "dictKey",
- },
- },
- {
- label: "區域/支行",
- prop: "deptName",
- },
- {
- label: "狀態",
- prop: "status",
- },
- {
- label: "最近核對時間",
- prop: "checkDate",
- type: "datetime",
- },
- ],
- },
- dataWeek:[],
- pageWeek: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- optionWeek: {
- card: true,
- menu: false,
- align: 'center',
- header: false,
- column: [
- {
- label: "每週核對項目",
- prop: "item",
- type: "select",
- dicUrl: "/api/blade-system/dict/dictionary?code=check_item",
- props:{
- label: "dictValue",
- value: "dictKey",
- },
- },
- {
- label: "區域/支行",
- prop: "deptName",
- },
- {
- label: "狀態",
- prop: "status",
- },
- {
- label: "最近核對時間",
- prop: "checkDate",
- type: "datetime",
- },
- ],
- },
- dataMonth: [],
- pageMonth: {
- pageSize: 10,
- currentPage: 1,
- total: 0
- },
- optionMonth: {
- card: true,
- menu: false,
- header: false,
- align: 'center',
- column: [
- {
- label: "每月核對項目",
- prop: "item",
- type: "select",
- overHidden: true,
- dicUrl: "/api/blade-system/dict/dictionary?code=check_item",
- props:{
- label: "dictValue",
- value: "dictKey",
- },
- },
- {
- label: "區域/支行",
- prop: "deptName",
- },
- {
- label: "狀態",
- prop: "status",
- },
- {
- label: "最近核對時間",
- prop: "checkDate",
- type: "datetime",
- },
- ],
- },
- };
- },
- computed: {
- ...mapGetters(["permission", "userInfo", "menuAll"]),
- },
- created() {
- getChildsDept().then(res => {
- let data = res.data.data;
- for (let i = 0; i < data.length; i++) {
- let item = data[i];
- if (item.orgNo.indexOf('999') == 0){
- data.splice(i,1);
- i--;
- }
- }
- this.deptList = data;
- if (data && data.length > 0){
- this.selectDept(data[0].orgNo)
- }
- });
- getMyInitiated().then(res => {
- const initiatedCount = res.data.data;
- this.optionFront.data[0].count = initiatedCount;
- this.optionBackgr.data[1].count = initiatedCount;
- })
- getToBoReleased().then(res => {
- const tobeReleaseCount = res.data.data;
- this.optionBackgr.data[2].count = tobeReleaseCount;
- });
- getToBeConfirmed().then(res => {
- const tobeConfirmedCount = res.data.data;
- this.optionFront.data[1].count = tobeConfirmedCount;
- this.optionBackgr.data[0].count = tobeConfirmedCount;
- });
- getMyConfirmation().then(res => {
- const confirmedCount = res.data.data;
- this.optionFront.data[2].count = confirmedCount;
- });
- },
- mounted() {
- if (this.menuAll.length > 0){
- this.getBusinessMenu();
- }else{
- getRoutes().then(res => {
- this.menuAll = res.data.data;
- this.getBusinessMenu();
- });
- }
- },
- methods: {
- selectDept(value){
- this.selectOrgNo = value;
- this.onLoadDay(this.pageDay)
- this.onLoadWeek(this.pageWeek)
- this.onLoadMonth(this.pageMonth)
- },
- getBusinessMenu() {
- for (let i = 0; i < this.menuAll.length; i++) {
- let item = this.menuAll[i];
- if (item.name == '業務管理') {
- this.menus = item.children;
- }
- }
- },
- handleChange(val) {
- },
- onLoadDay(page, params = {}){
- params.cycle = "day";
- params.orgNo = this.selectOrgNo;
- getReport(Object.assign(params, page)).then(res => {
- const data = res.data.data;
- this.dataDay = data;
- this.loading = false;
- // this.selectionClear();
- });
- /*getList(page.currentPage, page.pageSize, params).then(res => {
- const data = res.data.data;
- let list = data.records;
- for (let i = 0; i < list.length; i++) {
- let item = list[i];
- let status = false;
- if (item.isChecked == 1){
- let create = item.createTime.split(' ');
- let update = item.updateTime.split(' ');
- let time = update[1].split(':');
- if (create[0] == update[0] && time[0] < 21){
- status = true;
- }
- }
- item.status = status;
- }
- this.pageDay.total = data.total;
- this.dataDay = list;
- });*/
- },
- onLoadWeek(page, params = {}){
- params.cycle = "week";
- params.orgNo = this.selectOrgNo;
- getReport(Object.assign(params, page)).then(res => {
- const data = res.data.data;
- this.dataWeek = data;
- this.loading = false;
- // this.selectionClear();
- });
- /*getList(page.currentPage, page.pageSize, params).then(res => {
- const data = res.data.data;
- let list = data.records;
- for (let i = 0; i < list.length; i++) {
- let item = list[i];
- let status = false;
- if (item.isChecked == 1){
- let create = item.createTime.split(' ');
- let update = item.updateTime.split(' ');
- let time = update[1].split(':');
- if (create[0] == update[0] && time[0] < 21){
- status = true;
- }
- }
- item.status = status;
- }
- this.pageWeek.total = data.total;
- this.dataWeek = list;
- });*/
- },
- onLoadMonth(page, params = {}){
- params.cycle = "month";
- params.orgNo = this.selectOrgNo;
- getReport(Object.assign(params, page)).then(res => {
- const data = res.data.data;
- this.dataMonth = data;
- this.loading = false;
- // this.selectionClear();
- });
- },
- },
- };
- </script>
- <style scoped>
- >>> .el-font-size {
- font-size: 14px;
- }
- >>> .el-collapse-item__header{
- font-size: 25px;
- font-weight: bold;
- }
- >>> .el-collapse-item__wrap{
- margin: 15px;
- }
- >>> th, td{
- padding: 10px;
- margin: 10px;
- }
- </style>
|