123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324 |
- <template>
- <div class="mc-wrap">
- <div class="container-box">
- <div class="mc-top">
- <div class="mc-top-left">
- <el-row>
- <el-col :span="24">
- <div class="car-line">
- <el-carousel height="40px" direction="vertical" trigger="click">
- <el-carousel-item
- v-for="item in noticeData"
- :key="item.noticeId"
- >
- <div class="car-box">
- <i class="el-icon-message-solid"></i>
- <span>公告</span>
- <span style="color: #0b82ff" @click="uploadsee(item)">{{
- item.noticeTitle
- }}</span>
- <span @click="jNotice">更多</span>
- </div>
- </el-carousel-item>
- </el-carousel>
- </div>
- </el-col>
- </el-row>
- <el-row>
- <el-col
- :span="24"
- style="background: #fff; margin-top: 10px; border-radius: 5px"
- >
- <leaderTag :dynamicTags="dynamicTags"></leaderTag>
- </el-col>
- </el-row>
- <el-row>
- <div v-if="status">
- <el-col :span="18">
- <hometask></hometask>
- </el-col>
- <el-col :span="6">
- <numberhits
- :numHits="numHits"
- :numHits1="numHits1"
- ></numberhits>
- </el-col>
- </div>
- <div v-else>
- <el-col :span="24">
- <hometask></hometask>
- </el-col>
- </div>
- </el-row>
- <el-row style="margin-top: 10px">
- <ProcessingInstruction></ProcessingInstruction>
- </el-row>
- </div>
- </div>
- </div>
- <el-dialog
- title="公告"
- :visible.sync="dialogStatus"
- width="50%"
- :close-on-press-escape="false"
- :show-close="true"
- :destroy-on-close="true"
- :modal-append-to-body="false"
- :close-on-click-modal="false"
- :fullscreen="true"
- >
- <el-form :model="infolist" ref="infolist">
- <div style="height: calc(100vh - 180px); overflow-y: scroll">
- <notiCheck
- :infolist="infolist"
- :datalist="datalist"
- :dialogInfo="dialogStatus"
- ></notiCheck>
- </div>
- </el-form>
- <div class="myfooter" style="text-align: right; margin: 20px 20px 0 0">
- <el-button @click="dialogStatus = false">确 定</el-button>
- <el-button @click="dialogStatus = false">取 消</el-button>
- </div>
- </el-dialog>
- </div>
- </template>
- <script>
- import ProcessingInstruction from "./leaderHprocess.vue";
- import hometask from "./leaderhomeTask.vue";
- import numberhits from "./numberHits.vue";
- import leaderTag from "./leaderTag.vue";
- import notiCheck from "../../../components/notiCheck.vue";
- import uploadDown from "../../../components/uploadDown";
- export default {
- components: {
- ProcessingInstruction,
- hometask,
- numberhits,
- leaderTag,
- notiCheck,
- uploadDown,
- },
- data() {
- return {
- noticeData: [], // 公告数据源
- status: true,
- dynamicTags: [], //已添加的常用功能
- numHits: [], //点击率排行
- numHits1: [],
- menuqList: [], //有权限的菜单
- dialogStatus: false,
- datalist: [],
- infolist: {},
- };
- },
- methods: {
- //获取员工信息
- getpeo() {
- this.$http({
- url: "/sysmgr/csysdept/queryGroupListByLoginNo",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {},
- }).then((res) => {
- if (res.data[0].parentorgid === "00440063000000000000") {
- this.status = false;
- }
- });
- },
- //获取公告 分部门展示
- getNotice() {
- this.$http({
- url: "/sysmgr/cnotice/queryListPage",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- page: '{"pageNo":"' + 1 + '","pageSize":"10"}',
- },
- data: {
- sts: 2,
- },
- }).then((res) => {
- this.noticeData = res.data.data;
- });
- },
- //预览公告
- uploadsee(v) {
- this.dialogStatus = true;
- this.infolist = v;
- this.$http({
- url: "/sysmgr/cnotice/queryInfo",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {
- noticeId: v.noticeId,
- },
- }).then((res) => {
- this.uploadstatus = !this.uploadstatus;
- this.datalist.attList = [];
- this.datalist.attList = res.data.attList;
- // if(res.data.attList){
- // res.data.attList.forEach(item => {
- // this.attList.push({
- // name: item.fileName,
- // url: '',
- // id: item.id,
- // fileName: item.fileName
- // });
- // })
- // this.datalist.attList = this.attList;
- // console.log(this.datalist.attList)
- // }
- });
- },
- jNotice() {
- this.$router.push("/noticec");
- // this.setabList("公告管理","/noticec");
- },
- //获取初始Tags
- getTags() {
- this.$http({
- url: "/market/usuaFun/queryFun",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {},
- }).then((res) => {
- this.dynamicTags = res.data;
- });
- },
- //获取点击量
- getnumberHit() {
- // this.$http({
- // url: "/sysmgr/sys/login/auth/functions",
- // method: "post",
- // headers: {
- // "Content-Type": "application/json",
- // },
- // data: {
- // // roleCode: val.roleCode,
- // // roleCode: "647733085966045184"
- // },
- // }).then((res) => {
- // let men = res.data.functions;
- // let newmen = [];
- // for (let i in men) {
- // if (men[i].jspUrl != "#") {
- // newmen.push(men[i]);
- // }
- // }
- // console.log("array", newmen);
- // this.menuqList = newmen;
- // let newmen1 = [];
- // for (let b in this.menuqList) {
- // for (let a in this.numHits) {
- // if (this.menuqList[b].jspUrl == this.numHits[a].jsp_url) {
- // newmen1.push(this.numHits[a]);
- // }
- // }
- // }
- // console.log(this.numHits)
- // console.log([...newmen1]);
- // });
- this.$http({
- url: "/market/clickRate/queryClickRate",
- method: "post",
- headers: {
- "Content-Type": "application/json",
- },
- data: {},
- }).then((res) => {
- let men = res.data;
- let newmen = [];
- for (let i in men) {
- if (men[i].jspUrl != "#") {
- newmen.push(men[i]);
- }
- }
- this.numHits = newmen;
- this.numHits1 = newmen.slice(0, 10);
- });
- },
- },
- mounted() {
- this.getpeo();
- this.getNotice();
- this.getTags();
- this.getnumberHit();
- },
- };
- </script>
- <style lang="scss" scoped>
- .mc-wrap {
- box-sizing: border-box !important;
- margin: 0;
- height: calc(100vh - 120px);
- overflow: hidden;
- width: 100%;
- padding-right: 10px;
- .container-box {
- width: 100%;
- height: calc(100% - 40px);
- margin-top: 10px;
- overflow-y: scroll;
- padding: 0 0 0 15px;
- }
- }
- .mc-top {
- display: flex;
- width: 100%;
- }
- .mc-wrap .mc-top-left {
- width: 100%;
- margin-right: 15px;
- }
- .mc-wrap .mc-top-right {
- width: calc(20% - 15px);
- background-color: white;
- overflow: hidden;
- .inner-box {
- width: calc(100% + 20px);
- background-color: white;
- overflow-y: scroll;
- }
- }
- .car-line {
- height: 40px;
- background: #fff;
- border-radius: 5px;
- // margin: 10px 0 0 0;
- .car-box {
- padding: 0 20px;
- line-height: 40px;
- color: #333;
- span {
- cursor: pointer;
- margin-right: 20px;
- }
- span:first-child {
- cursor: auto;
- }
- span:last-child {
- float: right;
- margin-right: 0;
- }
- }
- }
- </style>
|