修改pptpdf预览地址,修改数据展示方式

main
qinzhenpen 9 months ago
parent cacc0e2d1d
commit f08a2f5a94

Binary file not shown.

@ -1,3 +1,12 @@
// 数子转换千分位
export function numberFormat(x) {
x = x.toString();
var pattern = /(-?\d+)(\d{3})/;
while (pattern.test(x))
x = x.replace(pattern, "$1,$2");
return x;
}
// 格式化时间 // 格式化时间
export function timeFormat(date, format) { export function timeFormat(date, format) {
if(date == null || date === '' ){ if(date == null || date === '' ){

@ -20,11 +20,8 @@ import * as util from '@/common/ulit';
// 全局方法加载 // 全局方法加载
import {get, post, postJSON} from '@/common/request'; import {get, post, postJSON} from '@/common/request';
import {formatFloat, toDecimal, toDecimalx} from "./common/ulit"; import {formatFloat, toDecimal, toDecimalx} from "./common/ulit";
Vue.prototype.$Base64 = Base64; Vue.prototype.$Base64 = Base64;
Vue.use(VueCookies); Vue.use(VueCookies);
Vue.prototype.$video = Video; Vue.prototype.$video = Video;
Video.Hls.xhr.beforeRequest = function(options) { //添加请求头token Video.Hls.xhr.beforeRequest = function(options) { //添加请求头token
options.headers = options.headers || {}; options.headers = options.headers || {};

@ -182,6 +182,7 @@ export default {
code:"", code:"",
userName:"", userName:"",
password:"", password:"",
token:'',
userNameFocus:true, userNameFocus:true,
onLogin:0, onLogin:0,
remember_password:false, // remember_password:false, //
@ -297,6 +298,7 @@ export default {
this.getUniversitiesCollegesList(); this.getUniversitiesCollegesList();
}, },
onSubmit(){ onSubmit(){
if(this.token==''){
if(this.userName == ""){ if(this.userName == ""){
this.$message.warning("请输入用户名!"); this.$message.warning("请输入用户名!");
return; return;
@ -316,8 +318,9 @@ export default {
return; return;
} }
this.sub_load = true; this.sub_load = true;
}
//this.$cookies.remove("JSESSIONID"); //this.$cookies.remove("JSESSIONID");
this.$post("/login.json",{code:this.userName,password:this.password}).then((ret) => { this.$post("/login.json",{code:this.userName,password:this.password,TOKEN:this.token}).then((ret) => {
this.sub_load = false; this.sub_load = false;
if (ret.code === 0 || ret.code === '0') { if (ret.code === 0 || ret.code === '0') {
localStorage.setItem('remember_password',this.remember_password); localStorage.setItem('remember_password',this.remember_password);
@ -471,7 +474,21 @@ export default {
}); });
} }
},
watch:{
'$route.query': {
handler(newQuery) {
if(newQuery.TOKEN){
this.token=newQuery.TOKEN
console.log('444444');
return this.onSubmit()
}
// query
},
immediate: true //
} }
},
}; };
</script> </script>
<style lang="less"> <style lang="less">

@ -177,6 +177,7 @@ import * as echarts from "echarts";
import jQuery from "jquery"; import jQuery from "jquery";
import Notice from "../course/components/Notice"; // import Notice from "../course/components/Notice"; //
import Advertisement from "@/components/Advertisement/index"; //广 import Advertisement from "@/components/Advertisement/index"; //广
import {numberFormat} from '@/common/ulit.js'
export default { export default {
name: "TeacherHome", name: "TeacherHome",
components: { components: {
@ -284,7 +285,7 @@ export default {
try { try {
this.pieMapsInfo.forEach(function(item, i) { this.pieMapsInfo.forEach(function(item, i) {
if (item.name == name) { if (item.name == name) {
throw new Error(item.name + " " + item.value); throw new Error(item.name + " " + numberFormat(item.value));
} }
}); });
} catch (e) { } catch (e) {

@ -21,32 +21,32 @@
<el-table-column prop="name" header-align="left" align="left" label="账户" width="220"> <el-table-column prop="name" header-align="left" align="left" label="账户" width="220">
<template slot-scope="scope"> <template slot-scope="scope">
<span v-if="accountTypeMap[scope.row.name] != '现金账户' && accountTypeMap[scope.row.name] != '银行账户'" style="margin-left:20px ;">&nbsp;</span> <span v-if="accountTypeMap[scope.row.name] != '现金账户' && accountTypeMap[scope.row.name] != '银行账户'" style="margin-left:20px ;">&nbsp;</span>
{{accountTypeMap[scope.row.name]}} {{ accountTypeMap[scope.row.name] }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="initialCapital" header-align="center" align="center" label="初始资金"> <el-table-column prop="initialCapital" header-align="center" align="center" label="初始资金">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.initialCapital || 0}} {{numberFormat(scope.row.initialCapital || 0)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="initialInvestmentCapital" header-align="center" align="center" label="期初投资资金"> <el-table-column prop="initialInvestmentCapital" header-align="center" align="center" label="期初投资资金">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.initialInvestmentCapital || 0}} {{numberFormat(scope.row.initialInvestmentCapital || 0)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="transferinAmount" header-align="center" align="center" label="转入资金"> <el-table-column prop="transferinAmount" header-align="center" align="center" label="转入资金">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.transferinAmount || 0}} {{numberFormat(scope.row.transferinAmount || 0)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="transferOutAmount" header-align="center" align="center" label="转出资金"> <el-table-column prop="transferOutAmount" header-align="center" align="center" label="转出资金">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.transferOutAmount || 0}} {{numberFormat(scope.row.transferOutAmount || 0)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="availableFunds" header-align="center" align="center" label="可用资金"> <el-table-column prop="availableFunds" header-align="center" align="center" label="可用资金">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.availableFunds || 0}} {{numberFormat(scope.row.availableFunds || 0)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="intoAccount" header-align="center" align="center" label="转入账户" class-name="AmountValue"> <el-table-column prop="intoAccount" header-align="center" align="center" label="转入账户" class-name="AmountValue">
@ -100,27 +100,27 @@
</el-table-column> </el-table-column>
<el-table-column prop="initialCapital" header-align="center" align="center" label="初始资金"> <el-table-column prop="initialCapital" header-align="center" align="center" label="初始资金">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.initialCapital || 0}} {{numberFormat(scope.row.initialCapital || 0)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="initialInvestmentCapital" header-align="center" align="center" label="期初投资资金"> <el-table-column prop="initialInvestmentCapital" header-align="center" align="center" label="期初投资资金">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.initialInvestmentCapital || 0}} {{numberFormat(scope.row.initialInvestmentCapital || 0)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="transferinAmount" header-align="center" align="center" label="转入资金"> <el-table-column prop="transferinAmount" header-align="center" align="center" label="转入资金">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.transferinAmount || 0}} {{numberFormat(scope.row.transferinAmount || 0)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="transferOutAmount" header-align="center" align="center" label="转出资金"> <el-table-column prop="transferOutAmount" header-align="center" align="center" label="转出资金">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.transferOutAmount || 0}} {{numberFormat(scope.row.transferOutAmount || 0)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="availableFunds" header-align="center" align="center" label="可用资金"> <el-table-column prop="availableFunds" header-align="center" align="center" label="可用资金">
<template slot-scope="scope"> <template slot-scope="scope">
{{scope.row.availableFunds || 0}} {{numberFormat(scope.row.availableFunds || 0)}}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="intoAccount" header-align="center" align="center" label="转入账户"> <el-table-column prop="intoAccount" header-align="center" align="center" label="转入账户">
@ -176,7 +176,11 @@
<el-table-column prop="transferType" header-align="center" align="center" label="转账账户类型"> </el-table-column> <el-table-column prop="transferType" header-align="center" align="center" label="转账账户类型"> </el-table-column>
<el-table-column prop="zczh" header-align="center" align="center" label="转出账户"> </el-table-column> <el-table-column prop="zczh" header-align="center" align="center" label="转出账户"> </el-table-column>
<el-table-column prop="intoAccount" header-align="center" align="center" label="转入账户"> </el-table-column> <el-table-column prop="intoAccount" header-align="center" align="center" label="转入账户"> </el-table-column>
<el-table-column prop="transactionAmount" header-align="center" align="center" label="金额"> </el-table-column> <el-table-column prop="transactionAmount" header-align="center" align="center" label="金额">
<template slot-scope="scope">
{{numberFormat(scope.row.transactionAmount || 0)}}
</template>
</el-table-column>
<el-table-column prop="messageAcceptState" header-align="center" align="center" label="状态" width="120"> <el-table-column prop="messageAcceptState" header-align="center" align="center" label="状态" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-link type="primary" :underline="false">进行中</el-link> <el-link type="primary" :underline="false">进行中</el-link>
@ -190,6 +194,7 @@
</template> </template>
<script> <script>
import { numberFormat } from '@/common/ulit.js'
import TitleInfo from "@/components/TitleInfo"; // import TitleInfo from "@/components/TitleInfo"; //
import jQuery from 'jquery'; import jQuery from 'jquery';
export default { export default {
@ -268,6 +273,7 @@ export default {
//this.addSystem(); //this.addSystem();
}, },
methods: { methods: {
numberFormat,
arraySpanMethod({ row, column, rowIndex, columnIndex }) { arraySpanMethod({ row, column, rowIndex, columnIndex }) {
if (columnIndex === 0) { if (columnIndex === 0) {
if (rowIndex % 16 === 0) { if (rowIndex % 16 === 0) {

@ -22,6 +22,7 @@
</video> </video>
</el-row> </el-row>
<el-row v-show="show.fileShow" class="showBox"> <el-row v-show="show.fileShow" class="showBox">
<iframe id="InformationURL" :src='show.fileUrl' width='100%' height='100%' frameborder='1'></iframe> <iframe id="InformationURL" :src='show.fileUrl' width='100%' height='100%' frameborder='1'></iframe>
</el-row> </el-row>
<el-row v-show="show.imgShow" class="showBox" style="padding: 20px;overflow: auto;"> <el-row v-show="show.imgShow" class="showBox" style="padding: 20px;overflow: auto;">
@ -195,9 +196,9 @@ export default {
} }
}); });
} }
}, },
handleNodeClick(data) { //1 2 PPT 3 PDF 4 5 handleNodeClick(data) { //1 2 PPT 3 PDF 4 5
console.log(data,"resourcesInfoType");
if(!this.$isEmpty(this.player)){ // if(!this.$isEmpty(this.player)){ //
this.player.pause(); this.player.pause();
} }
@ -214,12 +215,13 @@ export default {
this.player.src({src:this.$isHttp(data.resourcesInfoContent),type:data.resourcesInfoContent.indexOf(".mp4")>=0?'video/mp4':'video/webm'}); this.player.src({src:this.$isHttp(data.resourcesInfoContent),type:data.resourcesInfoContent.indexOf(".mp4")>=0?'video/mp4':'video/webm'});
this.player.play(); // this.player.play(); //
}else if(data.resourcesInfoType == 2){ }else if(data.resourcesInfoType == 2){
if(data.resourcesInfoFiles.indexOf(".pdf") >= 0 || data.resourcesInfoFiles.indexOf(".PDF") >= 0){ if(data.resourcesInfoContent.indexOf(".pdf") >= 0 || data.resourcesInfoContent.indexOf(".PDF") >= 0 ){
this.show.PDFUrl = this.$isHttp(data.resourcesInfoFiles); this.show.PDFUrl = this.$isHttp(data.resourcesInfoContent);
this.show.fileShow = false; this.show.fileShow = false;
this.show.PDFShow = true; this.show.PDFShow = true;
}else{ }else{
this.show.fileUrl = this.$viewUrl + this.$isHttp(data.resourcesInfoFiles); this.show.fileUrl = this.$viewUrl + this.$isHttp(data.resourcesInfoContent);
this.show.fileShow = true; this.show.fileShow = true;
this.show.PDFShow = false; this.show.PDFShow = false;
} }

@ -9,8 +9,7 @@
v-for="item in GovernanceList" v-for="item in GovernanceList"
:key="item.id" :key="item.id"
@click="goUrl(item.redirectUrl, item.authorityInfo, '4')" @click="goUrl(item.redirectUrl, item.authorityInfo, '4')"
:class="{ 'is-dispaly': item.authorityInfo !== 1 }" :class="{ 'is-dispaly': item.authorityInfo !== 1 }">
>
<img :src="require(`../../images/Economics/${item.img}`)" alt="" /> <img :src="require(`../../images/Economics/${item.img}`)" alt="" />
<div>{{ item.name }}</div> <div>{{ item.name }}</div>
</div> </div>

@ -1,11 +1,12 @@
(function () { (function () {
var config = { var config = {
// site:'http://192.168.2.17:9090/server', //数据请求地址
// site:'http://localhost:9090/server', //数据请求地址 // site:'http://localhost:9090/server', //数据请求地址
site:'http://http://121.40.130.32:9090/server', //数据请求地址 // site:'http://http://121.40.130.32:9090/server', //数据请求地址
// site:'http://10.0.149.100:9090/server', //数据请求地址 // site:'http://10.0.149.100:9090/server', //数据请求地址
// site:'http://202.199.90.115:9090/server', //数据请求地址 // site:'http://202.199.90.115:9090/server', //数据请求地址
// site:'https://zycloud.sztzjy.com/server', //数据请求地址 site:'https://zycloud.sztzjy.com/server', //线上数据请求地址
viewUrl:'http://39.108.104.1/op/view.aspx?src=', //PDF、PPT、WORD等在线预览的地址 viewUrl:'http://view.officeapps.live.com/op/view.aspx?src=', //PDF、PPT、WORD等在线预览的地址
// site:'http://192.168.110.95:9090/server' // site:'http://192.168.110.95:9090/server'
} }
window.configs = { window.configs = {

Loading…
Cancel
Save