|
@@ -24,7 +24,7 @@
|
|
<span>签约环节
|
|
<span>签约环节
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
- <first-info-form ref="firstInfo" :info="infoqy" :cylbOptions="cylbOptions" :qybjOptions="qybjOptions"></first-info-form>
|
|
|
|
|
|
+ <first-info-form @getTreeData='testData' ref="firstInfo" :info="infoqy" :cylbOptions="cylbOptions" :qybjOptions="qybjOptions"></first-info-form>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane name="second">
|
|
<el-tab-pane name="second">
|
|
<div slot="label" class="tab flexc">
|
|
<div slot="label" class="tab flexc">
|
|
@@ -33,7 +33,7 @@
|
|
<span>开工环节
|
|
<span>开工环节
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
- <second-info-form ref="secondInfo" :info="infokg"></second-info-form>
|
|
|
|
|
|
+ <second-info-form @getTreeData='testData' ref="secondInfo" :info="infokg"></second-info-form>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane name="third">
|
|
<el-tab-pane name="third">
|
|
<div slot="label" class="tab flexc">
|
|
<div slot="label" class="tab flexc">
|
|
@@ -42,7 +42,7 @@
|
|
<span>建设环节
|
|
<span>建设环节
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
- <third-info-form ref="thirdInfo" :info="infojs" :jdqkData="jdqkData"></third-info-form>
|
|
|
|
|
|
+ <third-info-form @getTreeData='testData' ref="thirdInfo" :info="infojs" :jdqkData="jdqkData"></third-info-form>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane name="fourth">
|
|
<el-tab-pane name="fourth">
|
|
<div slot="label" class="tab flexc">
|
|
<div slot="label" class="tab flexc">
|
|
@@ -51,7 +51,7 @@
|
|
<span>投产环节
|
|
<span>投产环节
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
- <fourth-info-form ref="fourthInfo" :info="infotc" :jsxmjzData="jsxmjzData"></fourth-info-form>
|
|
|
|
|
|
+ <fourth-info-form @getTreeData='testData' ref="fourthInfo" :info="infotc" :jsxmjzData="jsxmjzData"></fourth-info-form>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
|
|
|
|
@@ -76,6 +76,7 @@
|
|
import {addTcxx, updateTcxx, delTcxx, getTcxx,getTcxxNum,listTcxx } from "@/api/zhaoshang/tcxx"
|
|
import {addTcxx, updateTcxx, delTcxx, getTcxx,getTcxxNum,listTcxx } from "@/api/zhaoshang/tcxx"
|
|
import {listMonth} from "@/api/zhaoshang/month"
|
|
import {listMonth} from "@/api/zhaoshang/month"
|
|
import {listJdqk} from "@/api/zhaoshang/jdqk"
|
|
import {listJdqk} from "@/api/zhaoshang/jdqk"
|
|
|
|
+ const defaultSettings = require("@/settings.js");
|
|
export default{
|
|
export default{
|
|
components:{
|
|
components:{
|
|
firstInfoForm,secondInfoForm,thirdInfoForm,fourthInfoForm
|
|
firstInfoForm,secondInfoForm,thirdInfoForm,fourthInfoForm
|
|
@@ -104,6 +105,7 @@
|
|
qybjOptions:[],
|
|
qybjOptions:[],
|
|
jsxmjzData:[],
|
|
jsxmjzData:[],
|
|
jdqkData:[],//建工进度情况
|
|
jdqkData:[],//建工进度情况
|
|
|
|
+ defaultSettings:defaultSettings,
|
|
}
|
|
}
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
@@ -194,7 +196,120 @@
|
|
rou.shiji = (rou.tdcrzjes - 0) + (rou.cftrjes - 0) +(rou.sbqds - 0)+(rou.fpjes - 0)+(rou.htjes - 0)
|
|
rou.shiji = (rou.tdcrzjes - 0) + (rou.cftrjes - 0) +(rou.sbqds - 0)+(rou.fpjes - 0)+(rou.htjes - 0)
|
|
})
|
|
})
|
|
})
|
|
})
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ testData(url){
|
|
|
|
+ let type = this.matchType(url)
|
|
|
|
+ if(process.env.VUE_APP_BASE_API == '/dev-api'){
|
|
|
|
+ url = this.defaultSettings.urls + url
|
|
|
|
+ }else{
|
|
|
|
+ url = this.defaultSettings.urls+process.env.VUE_APP_BASE_API + url
|
|
|
|
+ }
|
|
|
|
+ if( type == "image"){
|
|
|
|
+ window.open(url )
|
|
|
|
+ }
|
|
|
|
+ if( type == "word"){
|
|
|
|
+ window.open('https://view.officeapps.live.com/op/view.aspx?src=' + url )
|
|
|
|
+ }
|
|
|
|
+ if( type == "pdf" || type == 'other' ){
|
|
|
|
+ window.open(url )
|
|
|
|
+ }
|
|
|
|
+ if( type == "excel"){
|
|
|
|
+ window.open('https://view.officeapps.live.com/op/view.aspx?src=' + url )
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ matchType(fileName) {
|
|
|
|
+ // 后缀获取
|
|
|
|
+ var suffix = '';
|
|
|
|
+ // 获取类型结果
|
|
|
|
+ var result = '';
|
|
|
|
+ try {
|
|
|
|
+ var flieArr = fileName.split('.');
|
|
|
|
+ suffix = flieArr[flieArr.length - 1];
|
|
|
|
+ } catch (err) {
|
|
|
|
+ suffix = '';
|
|
|
|
+ }
|
|
|
|
+ // fileName无后缀返回 false
|
|
|
|
+ if (!suffix) {
|
|
|
|
+ result = false;
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ // 图片格式
|
|
|
|
+ var imglist = ['png', 'jpg', 'jpeg', 'bmp', 'gif'];
|
|
|
|
+ // 进行图片匹配
|
|
|
|
+ result = imglist.some(function(item) {
|
|
|
|
+ return item == suffix;
|
|
|
|
+ });
|
|
|
|
+ if (result) {
|
|
|
|
+ result = 'image';
|
|
|
|
+ return result;
|
|
|
|
+ };
|
|
|
|
+ // 匹配txt
|
|
|
|
+ var txtlist = ['txt'];
|
|
|
|
+ result = txtlist.some(function(item) {
|
|
|
|
+ return item == suffix;
|
|
|
|
+ });
|
|
|
|
+ if (result) {
|
|
|
|
+ result = 'txt';
|
|
|
|
+ return result;
|
|
|
|
+ };
|
|
|
|
+ // 匹配 excel
|
|
|
|
+ var excelist = ['xls', 'xlsx'];
|
|
|
|
+ result = excelist.some(function(item) {
|
|
|
|
+ return item == suffix;
|
|
|
|
+ });
|
|
|
|
+ if (result) {
|
|
|
|
+ result = 'excel';
|
|
|
|
+ return result;
|
|
|
|
+ };
|
|
|
|
+ // 匹配 word
|
|
|
|
+ var wordlist = ['doc', 'docx','word'];
|
|
|
|
+ result = wordlist.some(function(item) {
|
|
|
|
+ return item == suffix;
|
|
|
|
+ });
|
|
|
|
+ if (result) {
|
|
|
|
+ result = 'word';
|
|
|
|
+ return result;
|
|
|
|
+ };
|
|
|
|
+ // 匹配 pdf
|
|
|
|
+ var pdflist = ['pdf'];
|
|
|
|
+ result = pdflist.some(function(item) {
|
|
|
|
+ return item == suffix;
|
|
|
|
+ });
|
|
|
|
+ if (result) {
|
|
|
|
+ result = 'pdf';
|
|
|
|
+ return result;
|
|
|
|
+ };
|
|
|
|
+ // 匹配 ppt
|
|
|
|
+ var pptlist = ['ppt'];
|
|
|
|
+ result = pptlist.some(function(item) {
|
|
|
|
+ return item == suffix;
|
|
|
|
+ });
|
|
|
|
+ if (result) {
|
|
|
|
+ result = 'ppt';
|
|
|
|
+ return result;
|
|
|
|
+ };
|
|
|
|
+ // 匹配 视频
|
|
|
|
+ var videolist = ['mp4', 'm2v', 'mkv'];
|
|
|
|
+ result = videolist.some(function(item) {
|
|
|
|
+ return item == suffix;
|
|
|
|
+ });
|
|
|
|
+ if (result) {
|
|
|
|
+ result = 'video';
|
|
|
|
+ return result;
|
|
|
|
+ };
|
|
|
|
+ // 匹配 音频
|
|
|
|
+ var radiolist = ['mp3', 'wav', 'wmv'];
|
|
|
|
+ result = radiolist.some(function(item) {
|
|
|
|
+ return item == suffix;
|
|
|
|
+ });
|
|
|
|
+ if (result) {
|
|
|
|
+ result = 'radio';
|
|
|
|
+ return result;
|
|
|
|
+ }
|
|
|
|
+ // 其他 文件类型
|
|
|
|
+ result = 'other';
|
|
|
|
+ return result;
|
|
|
|
+ },
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|