Commit aca9f49c authored by 夏敏伟's avatar 夏敏伟

增加制作简报

parent 32559d08
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</li> </li>
</ul> </ul>
</div> </div>
<el-button type="primary" @click="upload()">开始上传</el-button> <el-button class="startUpload" type="primary" @click="upload()">开始上传</el-button>
</div> </div>
</template> </template>
<script> <script>
...@@ -233,33 +233,33 @@ export default { ...@@ -233,33 +233,33 @@ export default {
#thelist { #thelist {
height: auto; height: auto;
overflow-y: auto; overflow-y: auto;
max-height: calc(100% - 40px); max-height: calc(100% - 130px);
} }
#thelist a { #thelist a {
text-decoration: underline; // text-decoration: underline;
cursor: pointer; cursor: pointer;
font-size: 18px; font-size: 14px;
color: white;
} }
#thelist li { #thelist li {
/* 去掉li前面的小圆点 */ /* 去掉li前面的小圆点 */
list-style: none; list-style: none;
margin: 10px 0px; margin: 10px 0px;
.el-progress{
width: 95%;
margin-top: 3px;
.el-progress-bar{
.el-progress-bar__outer{
height: 12px !important;
}
}
}
} }
.button-discuss { .startUpload{
width: 100px;
height: 30px;
line-height: 30px;
float: left;
font-size: 14px;
margin-top: 5px; margin-top: 5px;
margin-left: 20px;
text-align: center;
cursor: pointer;
background-image: url(../../assets/img/yqjc/40.png);
background-repeat: no-repeat;
background-size: 100% 100%;
} }
</style> </style>
...@@ -3,7 +3,7 @@ import Docxtemplater from 'docxtemplater' ...@@ -3,7 +3,7 @@ import Docxtemplater from 'docxtemplater'
import { saveAs } from 'file-saver' import { saveAs } from 'file-saver'
import JSZip from 'jszip' import JSZip from 'jszip'
import ImageModule from 'docxtemplater-image-module-free' import ImageModule from 'docxtemplater-image-module-free'
import { fileUpload } from './http_util'; // import { fileUpload } from './http_util';
import { Message } from 'element-ui'; import { Message } from 'element-ui';
let blobToDataURI = (blob, callback) => { let blobToDataURI = (blob, callback) => {
...@@ -79,15 +79,15 @@ export default (templateUrl, data, wordName, isDownload,author) => { ...@@ -79,15 +79,15 @@ export default (templateUrl, data, wordName, isDownload,author) => {
type: 'Blob', type: 'Blob',
mimeType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document', mimeType: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
}) })
let fd = new FormData(); // let fd = new FormData();
fd.append("file", out); // fd.append("file", out);
fd.append("author", author); // fd.append("author", author);
fd.append("name", wordName); // fd.append("name", wordName);
fileUpload('api/rest/document/uploadBriefing', fd).then(res => { // fileUpload('api/rest/document/uploadBriefing', fd).then(res => {
if (res == 1) { // if (res == 1) {
Message.success('上传成功!'); // Message.success('上传成功!');
} // }
}) // })
if (isDownload == 1) { if (isDownload == 1) {
// 将目标文件对象保存为目标类型的文件,并命名 // 将目标文件对象保存为目标类型的文件,并命名
saveAs(out, wordName + '.docx') saveAs(out, wordName + '.docx')
......
...@@ -192,7 +192,7 @@ ...@@ -192,7 +192,7 @@
<script> <script>
import { endLoading, get, startLoading, delete_util } from '../../util/http_util' import { endLoading, get, startLoading, delete_util } from '../../util/http_util'
import { queryCollection, queryOneNews, queryLiterature, removeCollection } from '../../api/bookMark'; import { queryCollection, queryOneNews, queryLiterature, removeCollection } from '../../api/bookMark';
import { queryCollectionFolder } from '../../api/xxxl/llxx'; import { queryCollectionFolder, previewPdf } from '../../api/xxxl/llxx';
export default { export default {
name: 'bookMark1', name: 'bookMark1',
data() { data() {
...@@ -220,28 +220,16 @@ export default { ...@@ -220,28 +220,16 @@ export default {
showNews(item) { showNews(item) {
this.selectItem = item; this.selectItem = item;
startLoading(); startLoading();
queryOneNews(item.originId).then(res => { queryLiterature(item.originId).then(res => {
if (res != null) { if(res.list.length>0){
this.dialogVisible = true; previewPdf('LiteraturePDF', res.list[0].name);
this.newInfo = res; }else{
this.$nextTick(() => { this.$message.warning('暂未找到此文件!');
let keyword = this.selectItem.description.trim();
let htmlStr = document.getElementById('txt').innerText;
this.newInfo.txt = htmlStr.replace(keyword, "<span style='color:red'>" + keyword + "</span>");
});
} else {
queryLiterature(item.originId).then(resLi => {
window.open('api/rest/document/viewLiterature/' + resLi.list[0].folder + '/' + resLi.list[0].name);
}).catch(err => {
this.$message.warning(err.message);
});
} }
endLoading(); endLoading();
}) }).catch(err => {
.catch((err) => { this.$message.warning(err.message);
endLoading(); });
this.$message.warning(err.message);
})
}, },
handleClose(done) { handleClose(done) {
done(); done();
......
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
let type = file.name.split('.')[1]; let type = file.name.split('.')[1];
if (type == 'png' || type == 'jpg' || type == 'PNG' || type == 'JPG') { if (type == 'png' || type == 'jpg' || type == 'PNG' || type == 'JPG') {
this.form.messageForm = 'PICTURE'; this.form.messageForm = 'PICTURE';
} else if (type == 'mp4' || type == 'MP4') { } else if (type == 'mp4' || type == 'MP4' || type == 'flv' || type == 'FLV') {
this.form.messageForm = 'VIDEO'; this.form.messageForm = 'VIDEO';
} else if (type == 'xlsx' || type == 'xls' || type == 'XLSX' || type == 'XLS') { } else if (type == 'xlsx' || type == 'xls' || type == 'XLSX' || type == 'XLS') {
this.form.messageForm = 'EXCEL'; this.form.messageForm = 'EXCEL';
......
This diff is collapsed.
...@@ -17,15 +17,22 @@ ...@@ -17,15 +17,22 @@
<component :is="flfg_wx" :clientDetails="jczc_data" ref="jczc" /> <component :is="flfg_wx" :clientDetails="jczc_data" ref="jczc" />
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane>
<span slot="label"><i class="el-icon-edit-outline"></i>制作简报</span>
<div style="width: 100%; height: 100%">
<component :is="createBriefing" ref="createBrief" />
</div>
</el-tab-pane>
</el-tabs> </el-tabs>
</div> </div>
</template> </template>
<script> <script>
import flfg_flfg from "./flfg_flfg.vue"; import flfg_flfg from "./flfg_flfg.vue";
import navs_wx from "./wx_data_public.vue"; import navs_wx from "./wx_data_public.vue";
import createBriefingDialog from "@/view/sjgl/components/createBriefingDialog.vue";
let id = 1000; let id = 1000;
export default { export default {
components: { flfg_flfg, navs_wx }, components: { flfg_flfg, navs_wx ,createBriefingDialog},
data() { data() {
return { return {
currentRole_wx_data: "flfg_flfg", currentRole_wx_data: "flfg_flfg",
...@@ -33,6 +40,7 @@ export default { ...@@ -33,6 +40,7 @@ export default {
editableTabsValue: "0", editableTabsValue: "0",
jczc_data: {}, jczc_data: {},
flfg_wx: "navs_wx", flfg_wx: "navs_wx",
createBriefing:'createBriefingDialog'
}; };
}, },
methods: { methods: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment