123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672 |
- <!-- 委员会通知公告详情 -->
- <template>
- <div class="autoBox box1" style="position: relative; background: #f5f5f5">
- <div class="center" style="margin-top: -20px">
- <div class="left">
- <div class="centerLeft1">
- <div class="top">
- <div class="top1"></div>
- <div class="top2"></div>
- <div class="allApplication">
- <!-- <span>{{ $t("common.commentsDetail") }}</span> -->
- <!--<span>{{ $t("common.noticeDetail") }}</span>-->
- </div>
- </div>
- <div class="content">
- <div class="title" style="text-align: center">
- <span>{{ this.documentListForDetails.title }}</span>
- </div>
- <div class="nav" style=" margin-top: 10px">
- <div class="navLeft">
- <span>{{ $t("common.releasePeople") }}:</span>
- <span style="margin-left: 10px">{{
- this.documentListForDetails.releasePeopleName
- }}</span>
- </div>
- <div class="navRight" style="margin-left:50px">
- <span>{{ $t("common.releaseTime") }}:</span>
- <span style="margin-left: 10px">{{
- this.documentListForDetails.releaseTime
- }}</span>
- </div>
- </div>
- <div class="line"></div>
- <div class="text">
- <p :title="this.documentListForDetails.content">
- {{ this.documentListForDetails.content }}
- <!-- <span v-if="this.documentListForDetails.content.length > 500">...</span>-->
- </p>
- </div>
- <div class="attachment">
- <div class="mainBody1">
- <span>{{ $t("common.enclosure") }} :</span>
- </div>
- <div class="upload1" style="dispaly: flex">
- <!-- <ul>
- <li v-for="(item, index) in documentList" :key="item.id">
- <div>
- <img
- style="display: inline-block; width: 20px; height: 20px"
- src="@/assets/img/committeeWorkSpace/Frame@2x.png"
- alt=""
- />
- <span
- style="
- color: #569af8;
- text-decoration: underline;
- cursor: pointer;
- "
- >{{ item.fileNameDisplay }}</span
- >
- </div>
- </li>
- </ul> -->
- <div
- class="uploadContent"
- style=""
- >
- <!-- /api/nationregioncomittee-service/nrc/nrcApplys/uploadFile -->
- <el-upload
- style="margin-left: 24px"
- class="upload-demo"
- disabled
- action="/api/nationregioncomittee-service/nrc/nrcCommitteeDocumentAnnouncements/uploadFile"
- :on-preview="handlePreview"
- :on-remove="handleRemove"
- :before-remove="beforeRemove"
- :before-upload="beforeUpload"
- :on-success="handleAvatarSuccessAnnex"
- multiple
- :limit="3"
- :on-exceed="handleExceed"
- :file-list="filesList"
- >
- </el-upload>
- </div>
- </div>
- </div>
- </div>
- <div class="close">
- <el-button
- @click="close"
- style="width: 120px; height: 40px"
- type="primary"
- >{{ $t("common.close") }}</el-button
- >
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import {
- getNotificationDetail,
- uploadfile,
- } from "@/api/committee/committeeWorkSpace";
- import Screen from "@/components/screen";
- export default {
- name: "CommitteeNoticeListDetail",
- props: ["detailID", "category"],
- components: {
- Screen,
- },
- data() {
- return {
- documentListForDetails: [],
- documentList: [],
- fileList: [],
- showContent: null,
- filesList: [],
- };
- },
- watch: {
- "$i18n.locale"() {},
- },
- mounted() {
- window.scrollTo(0, 0);
- this.initData();
- },
- destroyed() {},
- methods: {
- // 上传相关
- handleRemove(file, fileList) {
- console.log(file, fileList);
- this.filename.forEach((item, index) => {
- if (file.name == item.fileNameDisplay) {
- this.filename.splice(index, 1);
- }
- });
- console.log(this.filename);
- },
- beforeRemove(file, fileList) {
- return this.$confirm(`确定移除 ${file.name}?`);
- },
- beforeUpload(file) {
- var FileExt = file.name.replace(/.+\./, "");
- if (
- ["zip", "pdf", "doc", "docx", "excel", "xls", "xlsx"].indexOf(
- FileExt.toLowerCase()
- ) === -1
- ) {
- this.$message({
- type: "warning",
- message: "请上传zip,pdf,word,excel的附件!",
- });
- this.fileList.splice(this.fileList.indexOf(file), 1);
- return false;
- }
- this.isLt2k = file.size / 1024 / 1024 < 10 ? "1" : "0";
- if (this.isLt2k === "0") {
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- this.$message({
- message: "上传文件大小不能超过10M!",
- type: "error",
- });
- } else {
- this.$message({
- message: "Upload file size cannot exceed 10m!",
- type: "error",
- });
- }
- return false;
- }
- },
- handleAvatarSuccessAnnex(res, file) {
- let obj = {};
- obj.fileNameDisplay = file.name;
- obj.filePath = res.data.filePath;
- obj.type = 2;
- this.filename.push(obj);
- console.log(this.filename);
- },
- handleExceed(files, fileList) {
- this.$message.warning(
- `当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
- files.length + fileList.length
- } 个文件`
- );
- },
- initData() {
- this.accessToDocumentsNoticeDetails();
- },
- // 获取公文通知详情
- accessToDocumentsNoticeDetails() {
- var params = this.detailID;
- getNotificationDetail(params).then((res) => {
- console.log(res);
- this.documentListForDetails = res.data.nrcCommitteeDocumentAnnouncement;
- this.documentListForDetails.releaseTime = this.documentListForDetails.releaseTime.substr(0,10);
- res.data.files.forEach((item) => {
- let obj = {};
- obj.name = item.fileNameDisplay;
- obj.url = item.filePath;
- obj.type = item.type;
- this.filesList.push(obj);
- });
- });
- },
- funClear() {
- this.textarea = "";
- },
- close() {
- if (this.category === "1") {
- this.$emit("noticeDetail", "documentList");
- } else if (this.category === "2") {
- this.$emit("noticeDetail", "noticeList");
- } else {
- var params = {
- name: "workspace",
- type: true,
- };
- this.$emit("applicationType", params);
- }
- },
- handleCurrentChange() {},
- back() {
- this.$router.back();
- },
- screenBack() {},
- changeTitle(i) {
- this.titleIndex = i;
- },
- // 上传相关
- handleRemove(file, fileList) {
- console.log(file, fileList);
- this.filename.forEach((item, index) => {
- if (file.name == item.fileNameDisplay) {
- this.filename.splice(index, 1);
- }
- });
- console.log(this.filename);
- },
- beforeRemove(file, fileList) {
- return this.$confirm(`确定移除 ${file.name}?`);
- },
- beforeUpload(file) {
- var FileExt = file.name.replace(/.+\./, "");
- if (
- ["zip", "pdf", "doc", "docx", "excel", "xls", "xlsx"].indexOf(
- FileExt.toLowerCase()
- ) === -1
- ) {
- this.$message({
- type: "warning",
- message: "请上传zip,pdf,word,excel的附件!",
- });
- this.fileList.splice(this.fileList.indexOf(file), 1);
- return false;
- }
- this.isLt2k = file.size / 1024 / 1024 < 10 ? "1" : "0";
- if (this.isLt2k === "0") {
- if (this.$i18n.locale.toUpperCase() == "ZH") {
- this.$message({
- message: "上传文件大小不能超过10M!",
- type: "error",
- });
- } else {
- this.$message({
- message: "Upload file size cannot exceed 10m!",
- type: "error",
- });
- }
- return false;
- }
- },
- handleAvatarSuccessAnnex(res, file) {
- let obj = {};
- obj.fileNameDisplay = file.name;
- obj.filePath = res.data.filePath;
- obj.type = 2;
- this.filename.push(obj);
- console.log(this.filename);
- },
- handleExceed(files, fileList) {
- this.$message.warning(
- `当前限制选择 3 个文件,本次选择了 ${files.length} 个文件,共选择了 ${
- files.length + fileList.length
- } 个文件`
- );
- },
- handlePreview(file, fileList) {
- console.log(file, fileList);
- let param = {
- fileName: file.name,
- filePath: file.url,
- };
- uploadfile(param).then((res) => {
- const content = res;
- if (content) {
- const blob = new Blob([content]); //构造一个blob对象来处理数据
- const fileName = decodeURIComponent(res.fileName);
- //对于<a>标签,只有 Firefox 和 Chrome(内核) 支持 download 属性
- //IE10以上支持blob但是依然不支持download
- if ("download" in document.createElement("a")) {
- //支持a标签download的浏览器
- const link = document.createElement("a"); //创建a标签
- link.download = file.name; //a标签添加属性
- link.style.display = "none";
- link.href = URL.createObjectURL(blob);
- document.body.appendChild(link);
- link.click(); //执行下载
- URL.revokeObjectURL(link.href); //释放url
- document.body.removeChild(link); //释放标签
- } else {
- //其他浏览器
- navigator.msSaveBlob(blob, fileName);
- }
- } else {
- this.$message.error("服务器繁忙");
- }
- });
- },
- },
- };
- </script>
- <style scoped>
- ::v-deep .el-upload-list__item-name {
- color: #4790f7;
- text-decoration: underline;
- }
- /* ::v-deep .el-upload-list__item-name i {
- display: none;
- } */
- .content .title {
- width: 600px;
- height: 40px;
- line-height: 40px;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- position: absolute;
- left: 290px;
- top: 100px;
- font-family: "PingFang SC";
- font-style: normal;
- font-weight: 700;
- font-size: 20px;
- line-height: 22px;
- font-feature-settings: "tnum" on, "lnum" on;
- color: rgba(0, 0, 0, 0.85);
- }
- .content .nav {
- width: 1180px;
- display: flex;
- flex-direction: row;
- flex-wrap: nowrap;
- justify-content: center;
- font-family: "PingFang SC";
- font-style: normal;
- font-weight: 400;
- font-size: 14px;
- line-height: 14px;
- font-feature-settings: "tnum" on, "lnum" on;
- color: rgba(0, 0, 0, 0.65);
- }
- .content .line {
- position: absolute;
- left: 20px;
- top: 196px;
- width: 1159px;
- border: 1px solid rgba(0, 0, 0, 0.1);
- }
- .content .text {
- position: absolute;
- left: 59px;
- top: 209px;
- width: 1087px;
- text-indent: 2em;
- font-family: "PingFang SC";
- font-style: normal;
- font-weight: 400;
- font-size: 14px;
- line-height: 25px;
- font-feature-settings: "tnum" on, "lnum" on;
- color: rgba(0, 0, 0, 0.65);
- }
- .attachment .mainBody {
- position: absolute;
- left: 59px;
- top: 318px;
- font-family: "PingFang SC";
- font-style: normal;
- font-weight: 400;
- font-size: 16px;
- line-height: 0px;
- display: flex;
- align-items: center;
- text-indent: 30px;
- font-feature-settings: "tnum" on, "lnum" on;
- color: rgba(0, 0, 0, 0.95);
- }
- .attachment .upload {
- position: absolute;
- left: 107px;
- top: 350px;
- }
- .attachment .upload1 {
- position: absolute;
- left: 107px;
- top: 400px;
- }
- .attachment .upload2 {
- position: absolute;
- left: 107px;
- top: 380px;
- }
- .attachment .mainBody1 {
- position: absolute;
- left: 59px;
- top: 410px;
- font-family: "PingFang SC";
- font-style: normal;
- font-weight: 400;
- font-size: 16px;
- line-height: 0px;
- display: flex;
- align-items: center;
- text-indent: 30px;
- font-feature-settings: "tnum" on, "lnum" on;
- color: rgba(0, 0, 0, 0.95);
- }
- .top2 {
- position: absolute;
- top: 603px;
- }
- .top3 {
- position: absolute;
- top: 896px;
- }
- .table {
- width: 1123px;
- background: #ddd;
- position: absolute;
- left: 33px;
- top: 680px;
- }
- .box1 {
- padding: 0 0 20px 0;
- position: absolute;
- }
- .center {
- display: flex;
- }
- .topImg img {
- display: inline-block;
- width: 1200px;
- height: 324px;
- }
- .centerLeft1 {
- height: 650px;
- width: 1200px;
- border-radius: 0px;
- background: #fff;
- }
- .centerLeft1 .tab {
- position: absolute;
- right: 100px;
- top: 70px;
- display: flex;
- align-items: center;
- }
- .centerLeft1 .nav {
- position: absolute;
- top: 139px;
- left: 19px;
- }
- .list .title {
- font-family: "PingFang SC";
- font-style: normal;
- font-weight: 700;
- font-size: 20px;
- line-height: 22px;
- align-items: center;
- color: rgba(0, 0, 0, 0.85);
- font-feature-settings: "tnum" on, "lnum" on;
- }
- .list .center {
- font-weight: 400;
- color: rgba(0, 0, 0, 0.85);
- font-size: 14px;
- text-indent: 2em;
- }
- .left {
- position: relative;
- }
- .top .top1 {
- position: absolute;
- width: 5.5px;
- height: 10.5px;
- left: 20px;
- top: 35px;
- background: #376ac7;
- z-index: 1;
- }
- .top .top2 {
- position: absolute;
- width: 5.5px;
- height: 15px;
- left: 20px;
- top: 35px;
- background: #83bd50;
- }
- .top .allApplication {
- position: absolute;
- height: 22px;
- left: 34px;
- top: 31px;
- }
- .top2 .top1 {
- position: absolute;
- width: 5.5px;
- height: 10.5px;
- left: 20px;
- top: 35px;
- background: #376ac7;
- z-index: 1;
- }
- .top2 .top2 {
- position: absolute;
- width: 5.5px;
- height: 15px;
- left: 20px;
- top: 35px;
- background: #83bd50;
- }
- .top2 .allApplication {
- position: absolute;
- height: 22px;
- left: 34px;
- top: 15px;
- }
- .top2 .allApplication p {
- width: 180px;
- font-family: "PingFang SC";
- font-style: normal;
- font-weight: 600;
- font-size: 16px;
- line-height: 22px;
- color: #375586;
- }
- /* */
- .top3 .top1 {
- position: absolute;
- width: 5.5px;
- height: 10.5px;
- left: 20px;
- top: 35px;
- background: #376ac7;
- z-index: 1;
- }
- .top3 .top2 {
- position: absolute;
- width: 5.5px;
- height: 15px;
- left: 20px;
- top: 35px;
- background: #83bd50;
- }
- .top3 .allApplication {
- position: absolute;
- height: 22px;
- left: 34px;
- top: 15px;
- }
- .top3 .allApplication p {
- width: 80px;
- font-family: "PingFang SC";
- font-style: normal;
- font-weight: 600;
- font-size: 16px;
- line-height: 22px;
- color: #375586;
- }
- /* */
- .replyInput {
- width: 1123px;
- height: 146px;
- position: absolute;
- top: 970px;
- left: 33px;
- /* background: #ddd; */
- }
- .replyText {
- position: absolute;
- left: 67px;
- top: 1115px;
- }
- .replyText .textImg {
- /* position: absolute;
- left: 49px;
- top: 1115px; */
- margin-top: 17px;
- margin-right: 5px;
- }
- .replyText p {
- font-family: "Noto Sans SC";
- font-style: normal;
- font-weight: 400;
- font-size: 12px;
- line-height: 22px;
- font-feature-settings: "tnum" on, "lnum" on;
- color: rgba(0, 0, 0, 0.45);
- }
- .close {
- position: absolute;
- top: 567px;
- left: 535px;
- }
- .top .allApplication span {
- font-family: "PingFang SC";
- font-style: normal;
- font-weight: 600;
- font-size: 16px;
- line-height: 22px;
- color: #375586;
- }
- .top .notice {
- position: absolute;
- height: 22px;
- left: 160px;
- top: 32px;
- }
- .top .notice span {
- font-family: "PingFang SC";
- font-style: normal;
- font-weight: 600;
- font-size: 16px;
- line-height: 22px;
- color: rgba(10, 10, 10, 0.85);
- }
- .top .more span {
- font-family: "Roboto";
- font-style: normal;
- font-weight: 500;
- font-size: 14px;
- line-height: 16px;
- color: #4790f7;
- }
- /* ::v-deep .el-input__inner {
- height: 146px;
- } */
- .lowerBotton {
- position: absolute;
- bottom: 0;
- right: 70px;
- }
- </style>
|