|
@@ -1,110 +1,340 @@
|
|
|
<template>
|
|
|
<div class="app-container">
|
|
|
<div class="menu-list">
|
|
|
- <div class="group" v-for="(item, index) in menuList" :key="index">
|
|
|
+ <div>
|
|
|
+ <div class="main-title">
|
|
|
+ <div class="title">常用菜单</div>
|
|
|
+ <div
|
|
|
+ class="el-icon-setting"
|
|
|
+ @click="dialogVisible = !dialogVisible"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <div class="child">
|
|
|
+ <el-row :gutter="20">
|
|
|
+ <el-col
|
|
|
+ v-for="(it, idx) in normsMenuList"
|
|
|
+ :key="idx"
|
|
|
+ class="item"
|
|
|
+ :span="4"
|
|
|
+ style="margin-top: 16px;
|
|
|
+ padding: 3px 20px"
|
|
|
+ >
|
|
|
+ <el-link
|
|
|
+ class="link"
|
|
|
+ :underline="false"
|
|
|
+ @click="clickMenu(it.curUrl)"
|
|
|
+ >{{ it.moduleName }}</el-link>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div v-for="(item, index) in menuList" :key="index" class="group">
|
|
|
<div v-if="item.moduleName != '首页'">
|
|
|
<div class="main-title">
|
|
|
- <div class="title">{{item.moduleName}}</div>
|
|
|
+ <div class="title">{{ item.moduleName }}</div>
|
|
|
</div>
|
|
|
- <div class="child" v-if="item.children && item.children.length">
|
|
|
+ <div v-if="item.children && item.children.length" class="child">
|
|
|
<el-row :gutter="20">
|
|
|
- <el-col class="item" :span="4" v-for="(it, idx) in item.children" :key="idx">
|
|
|
- <el-link class="link" :underline="false" @click="clickMenu(it.curUrl)">{{it.moduleName}}</el-link>
|
|
|
+ <el-col
|
|
|
+ v-for="(it, idx) in item.children"
|
|
|
+ :key="idx"
|
|
|
+ class="item"
|
|
|
+ :span="4"
|
|
|
+ >
|
|
|
+ <el-link
|
|
|
+ class="link"
|
|
|
+ :underline="false"
|
|
|
+ @click="clickMenu(it.curUrl)"
|
|
|
+ >{{ it.moduleName }}</el-link>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</div>
|
|
|
- <div class="child" v-else>
|
|
|
+ <div v-else class="child">
|
|
|
<div class="item">
|
|
|
- <el-link class="link" :underline="false" @click="clickMenu(item.curUrl + '/index')">{{item.moduleName}}</el-link>
|
|
|
+ <el-link
|
|
|
+ class="link"
|
|
|
+ :underline="false"
|
|
|
+ @click="clickMenu(item.curUrl + '/index')"
|
|
|
+ >{{ item.moduleName }}</el-link>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
<!-- 弹窗 -->
|
|
|
- <el-dialog title="消息" :visible.sync="showMessages" width="50%" :show-close="false" :close-on-click-modal="false">
|
|
|
- <el-radio-group v-model="type" @change="checkFn" size="mini">
|
|
|
+ <el-dialog title="菜单配置" :visible.sync="dialogVisible" width="70%">
|
|
|
+ <el-checkbox-group v-model="checkList" :max="10">
|
|
|
+ <div v-for="(item, index) in menuList" :key="index" class="group">
|
|
|
+ <div v-if="item.moduleName != '首页'">
|
|
|
+ <div v-if="item.children && item.children.length" class="dia-child ">
|
|
|
+ <el-checkbox
|
|
|
+ v-for="(it, idx) in item.children"
|
|
|
+ :key="idx"
|
|
|
+ :label="it.moduleId"
|
|
|
+ class="dia-item"
|
|
|
+ >{{ it.moduleName }}</el-checkbox>
|
|
|
+ </div>
|
|
|
+ <div v-else class="child">
|
|
|
+ <el-checkbox class="dia-item" :label="item.moduleId">{{ item.moduleName }}</el-checkbox>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-checkbox-group>
|
|
|
+ <div class="dia-tip">( {{ checkList.length }} / 10 )注:最多选10个导航菜单</div>
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
+ <el-button @click="dialogVisible = false;checkList=[]">取 消</el-button>
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ @click="handleSaveMenu"
|
|
|
+ >确 定</el-button>
|
|
|
+ </span>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
+ <el-dialog
|
|
|
+ title="消息"
|
|
|
+ :visible.sync="showMessages"
|
|
|
+ width="50%"
|
|
|
+ :show-close="false"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ >
|
|
|
+ <el-radio-group v-model="type" size="mini" @change="checkFn">
|
|
|
<el-radio-button label="1">系统通知</el-radio-button>
|
|
|
<el-radio-button label="2">文件下发</el-radio-button>
|
|
|
<el-radio-button label="3">返利确认单</el-radio-button>
|
|
|
</el-radio-group>
|
|
|
- <br />
|
|
|
- <br />
|
|
|
+ <br>
|
|
|
+ <br>
|
|
|
<!-- 系统通知 -->
|
|
|
<div v-show="type == '1'" class="table">
|
|
|
- <el-table class="cql" v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
|
|
|
- <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="标题" prop="title" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="来源" prop="source" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="时间" prop="issueTime" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="" min-width="160" show-overflow-tooltip>
|
|
|
+ <el-table
|
|
|
+ v-loading="listLoading"
|
|
|
+ class="cql"
|
|
|
+ :data="dataList"
|
|
|
+ element-loading-text="Loading"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ stripe
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ type="index"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="标题"
|
|
|
+ prop="title"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="来源"
|
|
|
+ prop="source"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="时间"
|
|
|
+ prop="issueTime"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label=""
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" class="textColor" @click="lookInDialog(scope.row.id)">查看</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ class="textColor"
|
|
|
+ @click="lookInDialog(scope.row.id)"
|
|
|
+ >查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<!-- 文件下发 -->
|
|
|
<div v-show="type == '2'" class="table">
|
|
|
- <el-table v-loading="listLoading" :data="fileList" element-loading-text="Loading" border fit highlight-current-row stripe>
|
|
|
- <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="标题" prop="title" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="来源" prop="operatorNickName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="时间" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="操作" min-width="160" show-overflow-tooltip>
|
|
|
+ <el-table
|
|
|
+ v-loading="listLoading"
|
|
|
+ :data="fileList"
|
|
|
+ element-loading-text="Loading"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ stripe
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ type="index"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="标题"
|
|
|
+ prop="title"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="来源"
|
|
|
+ prop="operatorNickName"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="时间"
|
|
|
+ prop="createTime"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="操作"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" class="textColor" @click="downloadFn(scope.row.id)">下载</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ class="textColor"
|
|
|
+ @click="downloadFn(scope.row.id)"
|
|
|
+ >下载</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
<!-- 返利确认单 -->
|
|
|
<div v-show="type == '3'" class="table">
|
|
|
- <el-table v-loading="listLoading" :data="rebateList" element-loading-text="Loading" border fit highlight-current-row stripe>
|
|
|
- <el-table-column align="center" type="index" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="确认人" prop="examineBy" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="确认时间" prop="examineTime" min-width="160" show-overflow-tooltip></el-table-column>
|
|
|
- <el-table-column align="center" label="" min-width="160" show-overflow-tooltip>
|
|
|
+ <el-table
|
|
|
+ v-loading="listLoading"
|
|
|
+ :data="rebateList"
|
|
|
+ element-loading-text="Loading"
|
|
|
+ border
|
|
|
+ fit
|
|
|
+ highlight-current-row
|
|
|
+ stripe
|
|
|
+ >
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ type="index"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="经销商名称"
|
|
|
+ prop="customerName"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="确认人"
|
|
|
+ prop="examineBy"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label="确认时间"
|
|
|
+ prop="examineTime"
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ />
|
|
|
+ <el-table-column
|
|
|
+ align="center"
|
|
|
+ label=""
|
|
|
+ min-width="160"
|
|
|
+ show-overflow-tooltip
|
|
|
+ >
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" class="textColor" @click="secondFn(scope.row.rebateOrderId)">{{ isCustomer ? "确认" : "复核" }}</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ class="textColor"
|
|
|
+ @click="secondFn(scope.row.rebateOrderId)"
|
|
|
+ >{{ isCustomer ? "确认" : "复核" }}</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
</div>
|
|
|
|
|
|
- <br />
|
|
|
- <br />
|
|
|
+ <br>
|
|
|
+ <br>
|
|
|
<!-- 分页 -->
|
|
|
<div class="fr">
|
|
|
- <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage" :page-sizes="[10, 20, 30, 50]" :page-size="10" layout="total, sizes, prev, pager, next, jumper" :total="listTotal">
|
|
|
- </el-pagination>
|
|
|
+ <el-pagination
|
|
|
+ :current-page="currentPage"
|
|
|
+ :page-sizes="[10, 20, 30, 50]"
|
|
|
+ :page-size="10"
|
|
|
+ layout="total, sizes, prev, pager, next, jumper"
|
|
|
+ :total="listTotal"
|
|
|
+ @size-change="handleSizeChange"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ />
|
|
|
</div>
|
|
|
- <br /><br />
|
|
|
+ <br><br>
|
|
|
<!-- 内层弹窗 -->
|
|
|
- <el-dialog width="40%" title="消息标题" :visible.sync="inDialog" append-to-body>
|
|
|
+ <el-dialog
|
|
|
+ width="40%"
|
|
|
+ title="消息标题"
|
|
|
+ :visible.sync="inDialog"
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
<div class="detail-container">
|
|
|
<div class="title">{{ detailData.title }}</div>
|
|
|
<div class="text">
|
|
|
发布人:{{ detailData.issueNickName
|
|
|
- }}<el-divider direction="vertical"></el-divider>发布时间:{{
|
|
|
+ }}<el-divider direction="vertical" />发布时间:{{
|
|
|
detailData.issueTime
|
|
|
}}
|
|
|
</div>
|
|
|
- <el-divider></el-divider>
|
|
|
+ <el-divider />
|
|
|
<div class="content">{{ detailData.content }}</div>
|
|
|
- <el-divider v-if="detailData.files && detailData.files.length > 0"></el-divider>
|
|
|
- <div class="file" v-if="detailData.files && detailData.files.length > 0">
|
|
|
+ <el-divider v-if="detailData.files && detailData.files.length > 0" />
|
|
|
+ <div
|
|
|
+ v-if="detailData.files && detailData.files.length > 0"
|
|
|
+ class="file"
|
|
|
+ >
|
|
|
<div>附件:</div>
|
|
|
<div class="file-list">
|
|
|
- <div v-for="(item, index) in detailData.files" :key="index" class="item">
|
|
|
- <el-image v-if="checkFileType(item.url) == 'image'" class="img" :src="imageURL + item.url" :preview-src-list="[imageURL + item.url]"></el-image>
|
|
|
+ <div
|
|
|
+ v-for="(item, index) in detailData.files"
|
|
|
+ :key="index"
|
|
|
+ class="item"
|
|
|
+ >
|
|
|
+ <el-image
|
|
|
+ v-if="checkFileType(item.url) == 'image'"
|
|
|
+ class="img"
|
|
|
+ :src="imageURL + item.url"
|
|
|
+ :preview-src-list="[imageURL + item.url]"
|
|
|
+ />
|
|
|
<div v-else class="box2" @click="openLink(item.url)">
|
|
|
- <img src="@/assets/common/word.png" v-if="checkFileType(item.url) == 'word'" />
|
|
|
- <img src="@/assets/common/excel.png" v-if="checkFileType(item.url) == 'excel'" />
|
|
|
- <img src="@/assets/common/ppt.png" v-if="checkFileType(item.url) == 'ppt'" />
|
|
|
- <img src="@/assets/common/pdf.png" v-if="checkFileType(item.url) == 'pdf'" />
|
|
|
+ <img
|
|
|
+ v-if="checkFileType(item.url) == 'word'"
|
|
|
+ src="@/assets/common/word.png"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ v-if="checkFileType(item.url) == 'excel'"
|
|
|
+ src="@/assets/common/excel.png"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ v-if="checkFileType(item.url) == 'ppt'"
|
|
|
+ src="@/assets/common/ppt.png"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+ v-if="checkFileType(item.url) == 'pdf'"
|
|
|
+ src="@/assets/common/pdf.png"
|
|
|
+ >
|
|
|
<div class="name ellipsis-3">{{ item.name }}</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -112,7 +342,11 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button size="mini" type="primary" @click="confirmCheck(detailData.noticeId)">确认接收</el-button>
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="primary"
|
|
|
+ @click="confirmCheck(detailData.noticeId)"
|
|
|
+ >确认接收</el-button>
|
|
|
<el-button size="mini" @click="inDialog = false">关 闭</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
@@ -132,35 +366,39 @@ import {
|
|
|
confirmCheck,
|
|
|
getRebateOrderList,
|
|
|
getRouter,
|
|
|
-} from "@/api/dashboard";
|
|
|
-import { getFileUrl } from "@/api/common";
|
|
|
-import { mapGetters } from "vuex";
|
|
|
-import { getInfo, getOrder, getGoodsRank } from "@/api/dashboard";
|
|
|
-import { dateFormat } from "@/utils/util";
|
|
|
+ getMenuList,
|
|
|
+ setMenuList
|
|
|
+} from '@/api/dashboard'
|
|
|
+import { getFileUrl } from '@/api/common'
|
|
|
+import { mapGetters } from 'vuex'
|
|
|
+import { getInfo, getOrder, getGoodsRank } from '@/api/dashboard'
|
|
|
+import { dateFormat } from '@/utils/util'
|
|
|
|
|
|
export default {
|
|
|
- name: "Dashboard",
|
|
|
+ name: 'Dashboard',
|
|
|
created() {
|
|
|
this.getDataList({
|
|
|
pageSize: this.pageSize,
|
|
|
pageNum: this.currentPage,
|
|
|
- readFlag: false,
|
|
|
- });
|
|
|
+ readFlag: false
|
|
|
+ })
|
|
|
|
|
|
getRouter({
|
|
|
flag: 'index',
|
|
|
adminUserId: this.userid
|
|
|
- }).then(res => {
|
|
|
- this.menuList = res.data;
|
|
|
+ }).then((res) => {
|
|
|
+ this.menuList = res.data
|
|
|
+ console.log(res.data)
|
|
|
})
|
|
|
+ this.getMenuList()
|
|
|
},
|
|
|
computed: {
|
|
|
- ...mapGetters(["showMessages", 'userid']),
|
|
|
+ ...mapGetters(['showMessages', 'userid'])
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
imageURL: this.$imageUrl,
|
|
|
- type: "1",
|
|
|
+ type: '1',
|
|
|
currentPage: 1, // 当前页码
|
|
|
pageSize: 10, // 每页数量
|
|
|
listTotal: 0, // 列表总数
|
|
@@ -170,174 +408,196 @@ export default {
|
|
|
inDialog: false,
|
|
|
detailData: [],
|
|
|
rebateList: [],
|
|
|
- isCustomer: JSON.parse(localStorage.getItem("supply_user")).isCustomer,
|
|
|
+ isCustomer: JSON.parse(localStorage.getItem('supply_user')).isCustomer,
|
|
|
menuList: [],
|
|
|
- };
|
|
|
+ dialogVisible: false,
|
|
|
+ checkList: [],
|
|
|
+ normsMenuList: []
|
|
|
+ }
|
|
|
},
|
|
|
|
|
|
methods: {
|
|
|
+ // 获取常用菜单列表
|
|
|
+ getMenuList() {
|
|
|
+ getMenuList().then(res => {
|
|
|
+ this.normsMenuList = res.data
|
|
|
+ if (this.normsMenuList.length) {
|
|
|
+ this.normsMenuList.forEach(k => {
|
|
|
+ this.checkList.push(k.moduleId)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 保存常用菜单
|
|
|
+ handleSaveMenu() {
|
|
|
+ setMenuList({ adminModuleIds: this.checkList.join(',') }).then(res => {
|
|
|
+ this.$successMsg('设置成功')
|
|
|
+ this.getMenuList()
|
|
|
+ this.dialogVisible = false
|
|
|
+ })
|
|
|
+ },
|
|
|
// 打开链接
|
|
|
openLink(url) {
|
|
|
getFileUrl({ key: url }).then((res) => {
|
|
|
- window.open(res.data);
|
|
|
- });
|
|
|
+ window.open(res.data)
|
|
|
+ })
|
|
|
},
|
|
|
- //复核
|
|
|
+ // 复核
|
|
|
secondFn(id) {
|
|
|
this.$router.push({
|
|
|
- path: "/finance/rebate/rebate_list",
|
|
|
+ path: '/finance/rebate/rebate_list',
|
|
|
query: {
|
|
|
- id,
|
|
|
- },
|
|
|
- });
|
|
|
+ id
|
|
|
+ }
|
|
|
+ })
|
|
|
|
|
|
- this.$store.commit("user/showMessage", "no");
|
|
|
+ this.$store.commit('user/showMessage', 'no')
|
|
|
},
|
|
|
// 确认查收
|
|
|
confirmCheck(id) {
|
|
|
confirmCheck({ noticeIds: id }).then((res) => {
|
|
|
- this.$successMsg("查收成功");
|
|
|
- this.inDialog = false;
|
|
|
+ this.$successMsg('查收成功')
|
|
|
+ this.inDialog = false
|
|
|
this.getDataList({
|
|
|
pageSize: this.pageSize,
|
|
|
pageNum: this.currentPage,
|
|
|
- readFlag: false,
|
|
|
- });
|
|
|
- });
|
|
|
+ readFlag: false
|
|
|
+ })
|
|
|
+ })
|
|
|
},
|
|
|
// 检查文件类型
|
|
|
checkFileType(url) {
|
|
|
- if (!url) return "";
|
|
|
- const fileSuffix = url.substring(url.lastIndexOf(".") + 1);
|
|
|
+ if (!url) return ''
|
|
|
+ const fileSuffix = url.substring(url.lastIndexOf('.') + 1)
|
|
|
|
|
|
- if (["jpg", "jpeg", "png"].includes(fileSuffix)) {
|
|
|
- return "image";
|
|
|
- } else if (["doc", "docx", "dot", "wps", "wpt"].includes(fileSuffix)) {
|
|
|
- return "word";
|
|
|
- } else if (["xls", "xlsx", "xlt", "et", "ett"].includes(fileSuffix)) {
|
|
|
- return "excel";
|
|
|
+ if (['jpg', 'jpeg', 'png'].includes(fileSuffix)) {
|
|
|
+ return 'image'
|
|
|
+ } else if (['doc', 'docx', 'dot', 'wps', 'wpt'].includes(fileSuffix)) {
|
|
|
+ return 'word'
|
|
|
+ } else if (['xls', 'xlsx', 'xlt', 'et', 'ett'].includes(fileSuffix)) {
|
|
|
+ return 'excel'
|
|
|
} else if (
|
|
|
- ["ppt", "pptx", "dps", "dpt", "pot", "pps"].includes(fileSuffix)
|
|
|
+ ['ppt', 'pptx', 'dps', 'dpt', 'pot', 'pps'].includes(fileSuffix)
|
|
|
) {
|
|
|
- return "ppt";
|
|
|
- } else if (["pdf"].includes(fileSuffix)) {
|
|
|
- return "pdf";
|
|
|
+ return 'ppt'
|
|
|
+ } else if (['pdf'].includes(fileSuffix)) {
|
|
|
+ return 'pdf'
|
|
|
} else {
|
|
|
- return "";
|
|
|
+ return ''
|
|
|
}
|
|
|
},
|
|
|
- //查看
|
|
|
+ // 查看
|
|
|
async lookInDialog(id) {
|
|
|
- let res = await getNoticeDetail({ id });
|
|
|
+ const res = await getNoticeDetail({ id })
|
|
|
// console.log(res, 7898);
|
|
|
- this.detailData = res.data;
|
|
|
- this.inDialog = true;
|
|
|
+ this.detailData = res.data
|
|
|
+ this.inDialog = true
|
|
|
},
|
|
|
- //下载
|
|
|
+ // 下载
|
|
|
async downloadFn(id) {
|
|
|
- const res = await getComListDownload({ id });
|
|
|
+ const res = await getComListDownload({ id })
|
|
|
if (res.data) {
|
|
|
- window.open(this.imageURL + res.data);
|
|
|
+ window.open(this.imageURL + res.data)
|
|
|
}
|
|
|
},
|
|
|
- //获取文件列表数据
|
|
|
+ // 获取文件列表数据
|
|
|
async getFileList(data) {
|
|
|
- let res = await getComListList(data);
|
|
|
- this.fileList = res.data.records;
|
|
|
- this.listTotal = res.data.total;
|
|
|
+ const res = await getComListList(data)
|
|
|
+ this.fileList = res.data.records
|
|
|
+ this.listTotal = res.data.total
|
|
|
},
|
|
|
// 更改每页数量
|
|
|
handleSizeChange(val) {
|
|
|
- this.pageSize = val;
|
|
|
- this.currentPage = 1;
|
|
|
+ this.pageSize = val
|
|
|
+ this.currentPage = 1
|
|
|
if (this.type == 1) {
|
|
|
this.getDataList({
|
|
|
pageSize: this.pageSize,
|
|
|
pageNum: this.currentPage,
|
|
|
- readFlag: false,
|
|
|
- });
|
|
|
+ readFlag: false
|
|
|
+ })
|
|
|
}
|
|
|
if (this.type == 2) {
|
|
|
this.getFileList({
|
|
|
needDown: true,
|
|
|
pageSize: this.pageSize,
|
|
|
- pageNo: this.currentPage,
|
|
|
- });
|
|
|
+ pageNo: this.currentPage
|
|
|
+ })
|
|
|
}
|
|
|
if (this.type == 3) {
|
|
|
this.getRebateList({
|
|
|
pageSize: this.pageSize,
|
|
|
pageNum: this.currentPage,
|
|
|
- isSecondExamine: false,
|
|
|
- });
|
|
|
+ isSecondExamine: false
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
// 更改当前页
|
|
|
handleCurrentChange(val) {
|
|
|
- this.currentPage = val;
|
|
|
+ this.currentPage = val
|
|
|
if (this.type == 1) {
|
|
|
this.getDataList({
|
|
|
pageSize: this.pageSize,
|
|
|
pageNum: this.currentPage,
|
|
|
- readFlag: false,
|
|
|
- });
|
|
|
+ readFlag: false
|
|
|
+ })
|
|
|
}
|
|
|
if (this.type == 2) {
|
|
|
this.getFileList({
|
|
|
needDown: true,
|
|
|
pageSize: this.pageSize,
|
|
|
- pageNo: this.currentPage,
|
|
|
- });
|
|
|
+ pageNo: this.currentPage
|
|
|
+ })
|
|
|
}
|
|
|
if (this.type == 3) {
|
|
|
this.getRebateList({
|
|
|
pageSize: this.pageSize,
|
|
|
pageNum: this.currentPage,
|
|
|
- isSecondExamine: false,
|
|
|
- });
|
|
|
+ isSecondExamine: false
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
- //获取返利确认单数据
|
|
|
+ // 获取返利确认单数据
|
|
|
async getRebateList(data) {
|
|
|
- const res = await getRebateOrderList(data);
|
|
|
- this.rebateList = res.data.records;
|
|
|
- this.listTotal = res.data.total;
|
|
|
+ const res = await getRebateOrderList(data)
|
|
|
+ this.rebateList = res.data.records
|
|
|
+ this.listTotal = res.data.total
|
|
|
},
|
|
|
- //获取列表数据
|
|
|
+ // 获取列表数据
|
|
|
async getDataList(data) {
|
|
|
- const res = await getNoticeList(data);
|
|
|
- console.log(res);
|
|
|
- this.dataList = res.data.records;
|
|
|
- this.listTotal = res.data.total;
|
|
|
+ const res = await getNoticeList(data)
|
|
|
+ console.log(res)
|
|
|
+ this.dataList = res.data.records
|
|
|
+ this.listTotal = res.data.total
|
|
|
},
|
|
|
- //选择
|
|
|
+ // 选择
|
|
|
checkFn(v) {
|
|
|
- this.type = v;
|
|
|
+ this.type = v
|
|
|
if (v == 1) {
|
|
|
this.getDataList({
|
|
|
pageSize: this.pageSize,
|
|
|
pageNum: this.currentPage,
|
|
|
- readFlag: false,
|
|
|
- });
|
|
|
+ readFlag: false
|
|
|
+ })
|
|
|
}
|
|
|
if (v == 2) {
|
|
|
this.getFileList({
|
|
|
needDown: true,
|
|
|
pageSize: this.pageSize,
|
|
|
- pageNo: this.currentPage,
|
|
|
- });
|
|
|
+ pageNo: this.currentPage
|
|
|
+ })
|
|
|
}
|
|
|
if (v == 3) {
|
|
|
this.getRebateList({
|
|
|
pageSize: this.pageSize,
|
|
|
pageNum: this.currentPage,
|
|
|
- isSecondExamine: false,
|
|
|
- });
|
|
|
+ isSecondExamine: false
|
|
|
+ })
|
|
|
}
|
|
|
},
|
|
|
- //关闭
|
|
|
+ // 关闭
|
|
|
closeFn() {
|
|
|
- this.$store.commit("user/showMessage", "no");
|
|
|
+ this.$store.commit('user/showMessage', 'no')
|
|
|
},
|
|
|
|
|
|
// 点击菜单
|
|
@@ -346,8 +606,8 @@ export default {
|
|
|
path
|
|
|
})
|
|
|
}
|
|
|
- },
|
|
|
-};
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
.dashboard {
|
|
@@ -367,9 +627,31 @@ export default {
|
|
|
background-color: #f5f7fa;
|
|
|
}
|
|
|
}
|
|
|
+.dia-menu-title {
|
|
|
+ padding: 10px 0;
|
|
|
+ color: #000;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+.dia-tip {
|
|
|
+ padding: 10px 0;
|
|
|
+ color: #000;
|
|
|
+ font-weight: bold;
|
|
|
+}
|
|
|
+.dia-child{
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+}
|
|
|
+.dia-item{
|
|
|
+ flex: 0 1 220px;
|
|
|
+ padding: 3px 0;
|
|
|
+}
|
|
|
.menu-list {
|
|
|
.main-title {
|
|
|
margin: 10px 0 0;
|
|
|
+ .el-icon-setting {
|
|
|
+ cursor: pointer;
|
|
|
+ font-size: 22px;
|
|
|
+ }
|
|
|
}
|
|
|
.group {
|
|
|
margin-bottom: 20px;
|