Commit 169085a6 authored by 张锡奇's avatar 张锡奇

send

parent 1913572c
...@@ -52,10 +52,9 @@ Http.install = function (Vue) { ...@@ -52,10 +52,9 @@ Http.install = function (Vue) {
* @returns {Promise} * @returns {Promise}
*/ */
Vue.prototype.apiPost = function (url, data, toast = false,header) { Vue.prototype.apiPost = function (url, data, toast = false,header) {
if(!!header && JSON.stringify(header) != "{}"){ for(let x in header){
AsInst.defaults.headers.common['iProject'] = header.iProject; AsInst.defaults.headers.common[x] = header[x];
} }
if (toast && typeof (toast) === 'boolean') { if (toast && typeof (toast) === 'boolean') {
loading(); loading();
} else if (toast && typeof (toast) === 'string') { } else if (toast && typeof (toast) === 'string') {
...@@ -96,8 +95,8 @@ Http.install = function (Vue) { ...@@ -96,8 +95,8 @@ Http.install = function (Vue) {
loading(toast); loading(toast);
} }
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
if(!!header && JSON.stringify(header) != "{}"){ for(let x in header){
AsInst.defaults.headers.common['iProjectId'] = header.iProject; AsInst.defaults.headers.common[x] = header[x];
} }
AsInst.get(url, { AsInst.get(url, {
params: data params: data
......
...@@ -33,7 +33,13 @@ Vue.prototype.$echarts = echarts ...@@ -33,7 +33,13 @@ Vue.prototype.$echarts = echarts
function getAbsolutePath () { function getAbsolutePath () {
let path = location.pathname let path = location.pathname
// return path.substring(0, path.lastIndexOf('/') + 1) // return path.substring(0, path.lastIndexOf('/') + 1)
return "/apiproxy/huansi/hszh_report/main" let base;
if(path.indexOf('/apiproxy/huansi/hszh_report') != -1){
base = '/apiproxy/huansi/hszh_report/main';
}else{
base = '/main';
}
return base;
} }
const router = new VueRouter({ const router = new VueRouter({
mode:'history', mode:'history',
......
...@@ -37,7 +37,7 @@ let routes = [ ...@@ -37,7 +37,7 @@ let routes = [
path:'/main', path:'/main',
children:[ children:[
{ {
path:'/sales', path:'/sales/:iProjectId',
name:'chartMmcolorsale', name:'chartMmcolorsale',
component:()=> import('@/view/chart/sales/index.vue'), component:()=> import('@/view/chart/sales/index.vue'),
meta:{ meta:{
...@@ -53,7 +53,7 @@ let routes = [ ...@@ -53,7 +53,7 @@ let routes = [
} }
}, },
{ {
path:'/custom', path:'/custom/:iProjectId',
name:'chartCustom', name:'chartCustom',
component:()=> import('@/view/chart/custom/index.vue'), component:()=> import('@/view/chart/custom/index.vue'),
meta:{ meta:{
...@@ -69,7 +69,7 @@ let routes = [ ...@@ -69,7 +69,7 @@ let routes = [
} }
}, },
{ {
path:'/income', path:'/income/:iProjectId',
name:'chartIncome', name:'chartIncome',
component:()=> import('@/view/chart/income/index.vue'), component:()=> import('@/view/chart/income/index.vue'),
meta:{ meta:{
...@@ -77,7 +77,7 @@ let routes = [ ...@@ -77,7 +77,7 @@ let routes = [
} }
}, },
{ {
path:'/salesStatistics', path:'/salesStatistics/:iProjectId',
name:'chartStatistics', name:'chartStatistics',
component:()=> import('@/view/chart/sales/statistics.vue'), component:()=> import('@/view/chart/sales/statistics.vue'),
meta:{ meta:{
...@@ -92,8 +92,8 @@ let routes = [ ...@@ -92,8 +92,8 @@ let routes = [
path:'/main', path:'/main',
children:[ children:[
{ {
path:'/specimin/:iProjectId/:sMaterialNo', path:'/specimen/:iProjectId/:sMaterialNo',
name:'specimin', name:'specimen',
component:()=> import('@/view/specimen/index.vue'), component:()=> import('@/view/specimen/index.vue'),
meta:{ meta:{
title: '样品信息' title: '样品信息'
......
...@@ -5,7 +5,7 @@ const app = { ...@@ -5,7 +5,7 @@ const app = {
state: { state: {
userInfo:{}, userInfo:{},
chartHearData:{}, chartHearData:{},
iProject:5599 iProjectId:5599
}, },
mutations: { mutations: {
getUserInfo(state,obj){ getUserInfo(state,obj){
...@@ -15,7 +15,7 @@ const app = { ...@@ -15,7 +15,7 @@ const app = {
state.chartHearData = obj; state.chartHearData = obj;
}, },
setIproject(state,data){ setIproject(state,data){
state.iProject = data; state.iProjectId = data;
} }
}, },
actions: { actions: {
......
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
computed:{ computed:{
...mapState({ ...mapState({
chartHearData:state => state.app.chartHearData, chartHearData:state => state.app.chartHearData,
iProject:state => state.app.iProject iProjectId:state => state.app.iProjectId
}) })
}, },
mounted(){ mounted(){
...@@ -84,13 +84,13 @@ export default { ...@@ -84,13 +84,13 @@ export default {
async getPbcustomerDtl(){ async getPbcustomerDtl(){
let result = await this.request('getPbcustomerDtl',{ let result = await this.request('getPbcustomerDtl',{
params:this.chartHearData params:this.chartHearData
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
this.value=typeof result=='object'&&result.length>0&&result||[] this.value=typeof result=='object'&&result.length>0&&result||[]
}, },
async getPbsalesDtl(){ async getPbsalesDtl(){
let result= await this.request('getPbsalesDtl',{ let result= await this.request('getPbsalesDtl',{
params:this.chartHearData params:this.chartHearData
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
this.value=typeof result=='object'&&result.length>0&&result||[] this.value=typeof result=='object'&&result.length>0&&result||[]
}, },
setChart(){ setChart(){
......
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
dBeginDate:Util.dateFormat(new Date(),'yyyy-MM-01'), dBeginDate:Util.dateFormat(new Date(),'yyyy-MM-01'),
dEndDate:Util.dateFormat(new Date(),'yyyy-MM-dd'), dEndDate:Util.dateFormat(new Date(),'yyyy-MM-dd'),
}, },
iProject:5599, iProjectId:5599,
myChart1:null, myChart1:null,
myChart2:null, myChart2:null,
...@@ -86,8 +86,8 @@ export default { ...@@ -86,8 +86,8 @@ export default {
// this.initChart(this.myChart2,'myChart2'); // this.initChart(this.myChart2,'myChart2');
this.iProject = this.$route.query.id||window.location.search.slice(1) this.iProjectId = this.$route.params.iProjectId;
this.$store.dispatch('setIproject',this.iProject); this.$store.dispatch('setIproject',this.iProjectId);
await this.getPbcustomer(); await this.getPbcustomer();
await this.getPbsales(); await this.getPbsales();
...@@ -156,7 +156,7 @@ export default { ...@@ -156,7 +156,7 @@ export default {
async getPbcustomer(){ async getPbcustomer(){
let result = await this.request('getPbcustomer',{ let result = await this.request('getPbcustomer',{
params:this.search params:this.search
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
this.pbcustomer = typeof result=='object'&&result.length>0&&result.map(v=>{ this.pbcustomer = typeof result=='object'&&result.length>0&&result.map(v=>{
v.name=`${v.sCustomerName||''}\n${v.sCustomerNo||''}` v.name=`${v.sCustomerName||''}\n${v.sCustomerNo||''}`
return v return v
...@@ -166,7 +166,7 @@ export default { ...@@ -166,7 +166,7 @@ export default {
async getPbsales(){ async getPbsales(){
let result= await this.request('getPbsales',{ let result= await this.request('getPbsales',{
params:this.search params:this.search
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
this.pbsales = typeof result=='object'&&result.length>0&&result.map(v=>{ this.pbsales = typeof result=='object'&&result.length>0&&result.map(v=>{
v.name=`${v.sSalesName||''}\n${v.sSalesNo||''}` v.name=`${v.sSalesName||''}\n${v.sSalesNo||''}`
return v return v
......
...@@ -63,7 +63,7 @@ export default { ...@@ -63,7 +63,7 @@ export default {
dBeginDate:Util.dateFormat(new Date(),'yyyy-MM-01'), dBeginDate:Util.dateFormat(new Date(),'yyyy-MM-01'),
dEndDate:Util.dateFormat(new Date(),'yyyy-MM-dd'), dEndDate:Util.dateFormat(new Date(),'yyyy-MM-dd'),
}, },
iProject:5599, iProjectId:5599,
toUrl:{ toUrl:{
"myChart20":"/shopVersion/pages/form/revenue", "myChart20":"/shopVersion/pages/form/revenue",
"myChart21":"/shopVersion/pages/form/expenditure", "myChart21":"/shopVersion/pages/form/expenditure",
...@@ -90,8 +90,8 @@ export default { ...@@ -90,8 +90,8 @@ export default {
}) })
}) })
this.iProject = this.$route.query.id||window.location.search.slice(1) this.iProjectId = this.$route.params.iProjectId;
this.$store.dispatch('setIproject',this.iProject); this.$store.dispatch('setIproject',this.iProjectId);
await this.getPayable(); await this.getPayable();
await this.getReceivepay(); await this.getReceivepay();
...@@ -150,14 +150,14 @@ export default { ...@@ -150,14 +150,14 @@ export default {
async getPayable(){ async getPayable(){
let result = await this.request('getPayable',{ let result = await this.request('getPayable',{
params:this.search params:this.search
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
this.payable = result; this.payable = result;
this.drawLine1('myChart1'); this.drawLine1('myChart1');
}, },
async getReceivepay(){ async getReceivepay(){
let result= await this.request('getReceivepay',{ let result= await this.request('getReceivepay',{
params:this.search params:this.search
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
this.receivepay = result; this.receivepay = result;
this.drawLine2('myChart2'); this.drawLine2('myChart2');
}, },
......
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
computed:{ computed:{
...mapState({ ...mapState({
chartHearData:state => state.app.chartHearData, chartHearData:state => state.app.chartHearData,
iProject:state => state.app.iProject iProjectId:state => state.app.iProjectId
}) })
}, },
mounted(){ mounted(){
...@@ -82,18 +82,19 @@ export default { ...@@ -82,18 +82,19 @@ export default {
this.myChart.setOption(options); this.myChart.setOption(options);
this.myChart.resize() this.myChart.resize()
}); });
console.log(this.iProjectId)
}, },
methods:{ methods:{
async getMmcolorsaledtltop(){ async getMmcolorsaledtltop(){
let result = await this.request('getMmcolorsaledtltop',{ let result = await this.request('getMmcolorsaledtltop',{
params:this.chartHearData params:this.chartHearData
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
this.value=typeof result=='object'&&result.length>0&&result||[] this.value=typeof result=='object'&&result.length>0&&result||[]
}, },
async getMmsaledtltop(){ async getMmsaledtltop(){
let result= await this.request('getMmsaledtltop',{ let result= await this.request('getMmsaledtltop',{
params:this.chartHearData params:this.chartHearData
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
this.value=typeof result=='object'&&result.length>0&&result||[] this.value=typeof result=='object'&&result.length>0&&result||[]
}, },
setChart(){ setChart(){
......
...@@ -64,7 +64,7 @@ export default { ...@@ -64,7 +64,7 @@ export default {
dEndDate:Util.dateFormat(new Date(),'yyyy-MM-dd'), dEndDate:Util.dateFormat(new Date(),'yyyy-MM-dd'),
}, },
timer:null, timer:null,
iProject:5599, iProjectId:5599,
i:0, i:0,
myChart1:null, myChart1:null,
myChart2:null myChart2:null
...@@ -75,8 +75,9 @@ export default { ...@@ -75,8 +75,9 @@ export default {
this.myChart2 = this.$echarts.init(document.getElementById('myChart2')) this.myChart2 = this.$echarts.init(document.getElementById('myChart2'))
this.initChart(this.myChart1,'myChart1'); this.initChart(this.myChart1,'myChart1');
this.initChart(this.myChart2,'myChart2'); this.initChart(this.myChart2,'myChart2');
this.iProject = window.location.search.slice(1,window.location.search.length)
this.$store.dispatch('setIproject',this.iProject); this.iProjectId = this.$route.params.iProjectId;
this.$store.dispatch('setIproject',this.iProjectId);
await this.getMmcolorsaletop(); await this.getMmcolorsaletop();
await this.getMmsaletop(); await this.getMmsaletop();
...@@ -95,14 +96,14 @@ export default { ...@@ -95,14 +96,14 @@ export default {
async getMmcolorsaletop(){ async getMmcolorsaletop(){
let result = await this.request('getMmcolorsaletop',{ let result = await this.request('getMmcolorsaletop',{
params:this.search params:this.search
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
this.mmcolorsaletop = result; this.mmcolorsaletop = result;
this.setChart(this.myChart1,'myChart1') this.setChart(this.myChart1,'myChart1')
}, },
async getMmsaletop(){ async getMmsaletop(){
let result= await this.request('getMmsaletop',{ let result= await this.request('getMmsaletop',{
params:this.search params:this.search
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
this.mmsaletop = result; this.mmsaletop = result;
this.setChart(this.myChart2,'myChart2') this.setChart(this.myChart2,'myChart2')
}, },
...@@ -242,6 +243,7 @@ export default { ...@@ -242,6 +243,7 @@ export default {
let index = param.dataIndex; let index = param.dataIndex;
let data = {}; let data = {};
if(id == 'myChart1'){ if(id == 'myChart1'){
console.log(that.pbcustomer)
data = Object.assign(that.pbcustomer[index],{type:'pbcustomer'}) data = Object.assign(that.pbcustomer[index],{type:'pbcustomer'})
}else{ }else{
data = Object.assign(that.pbsales[index],{type:'pbsales'}); data = Object.assign(that.pbsales[index],{type:'pbsales'});
......
...@@ -106,7 +106,7 @@ export default { ...@@ -106,7 +106,7 @@ export default {
dBeginDate:Util.dateFormat(new Date(),'yyyy-MM-01'), dBeginDate:Util.dateFormat(new Date(),'yyyy-MM-01'),
dEndDate:Util.dateFormat(new Date(),'yyyy-MM-dd'), dEndDate:Util.dateFormat(new Date(),'yyyy-MM-dd'),
}, },
iProject:5599, iProjectId:5599,
chartData:{ chartData:{
set3:[], set3:[],
set4:{ set4:{
...@@ -153,8 +153,9 @@ export default { ...@@ -153,8 +153,9 @@ export default {
}) })
}) })
this.iProject=this.$route.query.id||window.location.search.slice(1) this.iProjectId= this.$route.params.iProjectId;
this.$store.dispatch('setIproject',this.iProject); console.log(this.$route)
this.$store.dispatch('setIproject',this.iProjectId);
this.searchData() this.searchData()
this.global.$on('searchData',()=>{ this.global.$on('searchData',()=>{
this.searchData() this.searchData()
...@@ -220,7 +221,7 @@ export default { ...@@ -220,7 +221,7 @@ export default {
dStartDate:this.search.dBeginDate, dStartDate:this.search.dBeginDate,
dEndDate:this.search.dEndDate dEndDate:this.search.dEndDate
} }
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
Object.assign(this.chartData,{ Object.assign(this.chartData,{
nOrderSameRatio:Math.round((value.set1&&value.set1[0]&&value.set1[0].nOrderSameRatio||0)*100)/100, nOrderSameRatio:Math.round((value.set1&&value.set1[0]&&value.set1[0].nOrderSameRatio||0)*100)/100,
nOrderRingRatio:Math.round((value.set2&&value.set2[0]&&value.set2[0].nOrderRingRatio||0)*100)/100, nOrderRingRatio:Math.round((value.set2&&value.set2[0]&&value.set2[0].nOrderRingRatio||0)*100)/100,
...@@ -238,14 +239,14 @@ export default { ...@@ -238,14 +239,14 @@ export default {
async chart2Data(){ async chart2Data(){
var value=await this.request('getMmcolorsaletop',{ var value=await this.request('getMmcolorsaletop',{
params:this.search params:this.search
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
this.chartData.set5=typeof value=='object'&&value.length>0&&value||[] this.chartData.set5=typeof value=='object'&&value.length>0&&value||[]
this.chartData.set5.forEach(v=>v.type='mmcolorsaletop') this.chartData.set5.forEach(v=>v.type='mmcolorsaletop')
var value=await this.request('getMmsaletop',{ var value=await this.request('getMmsaletop',{
params:this.search params:this.search
},true,{iProject:this.iProject}) },true,{iProjectId:this.iProjectId})
this.chartData.set6=typeof value=='object'&&value.length>0&&value||[] this.chartData.set6=typeof value=='object'&&value.length>0&&value||[]
this.chartData.set6.forEach(v=>v.type='mmsaletop') this.chartData.set6.forEach(v=>v.type='mmsaletop')
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
display: block; display: block;
max-width: 100%; max-width: 100%;
} }
#imageView .imageBox li img[data-v-cc57528a]{ #imageView .imageBox li img{
height:auto !important; height:auto !important;
} }
#imageView .imageBox li{ #imageView .imageBox li{
...@@ -43,25 +43,26 @@ ...@@ -43,25 +43,26 @@
justify-content: center; justify-content: center;
align-items: center; align-items: center;
background: #eef4fe; background: #eef4fe;
position: relative; // position: relative;
} }
img{ img{
height:200px; height:200px;
width:100%;
} }
img:after { // img:after {
content: ""; // content: "";
display: inline-block; // display: inline-block;
position: absolute; // position: absolute;
z-index: 2; // z-index: 2;
top: 0; // top: 0;
left: calc(50% - 100px); // left: calc(50% - 100px);
width: 200px; // width: 200px;
height: 200px; // height: 200px;
background: url("../../assets/imgErr.png") no-repeat; // background: url("../../assets/imgErr.png") no-repeat;
background-position: center; // background-position: center;
background-size: contain; // background-size: contain;
background-color: #fff; // background-color: #fff;
} // }
} }
.info{ .info{
.content{ .content{
...@@ -77,23 +78,29 @@ ...@@ -77,23 +78,29 @@
background: white; background: white;
border-top:1px solid #eef4fe; border-top:1px solid #eef4fe;
.img{ .img{
position: relative; // position: relative;
min-height:50px; display: flex;
} justify-content: center;
img:after { align-items: center;
content: ""; img{
display: inline-block; width: 100%;
position: absolute; max-height:50px;
z-index: 2; }
top: 0;
left: 0;
width: 100%;
height: 50px;
background: url("../../assets/imgErr.png") no-repeat;
background-position: center;
background-size: contain;
background-color: #fff;
} }
// img:after {
// content: "";
// display: inline-block;
// position: absolute;
// z-index: 2;
// top: 0;
// left: 0;
// width: 100%;
// height: 50px;
// background: url("../../assets/imgErr.png") no-repeat;
// background-position: center;
// background-size: contain;
// background-color: #fff;
// }
} }
} }
</style> </style>
...@@ -116,19 +123,20 @@ ...@@ -116,19 +123,20 @@
</div> </div>
</transition> </transition>
<div class="hdrImg"> <div class="hdrImg">
<img v-for="(item, index) in hdr_src" :src="item" @click="selectImg('hdr',index)" :key="index"/> <img v-for="(item, index) in hdr_src" v-if="!hdr.isErr" @error="error(item,index,'hdr')" :src="item" @click="selectImg('hdr',index)" :key="index"/>
<img v-else src="../../assets/imgErr.png"/>
</div> </div>
<div class="info"> <div class="info">
<h3>参数</h3> <h3>参数</h3>
<div class="content"> <div class="content">
<div class="left"> <div class="left">
<p>产品编号:{{hdr.sMaterialNo}}</p> <p>产品编号:{{hdr.sMaterialNo}}</p>
<p>幅宽:{{hdr.sWidth}}</p> <p>产品名称:{{hdr.sMaterialName}}</p>
<p>规格:{{hdr.sSpecification}}</p> <p>规格:{{hdr.sSpecification}}</p>
<p>成分:{{hdr.sComponent}}</p> <p>成分:{{hdr.sComponent}}</p>
</div> </div>
<div class="right"> <div class="right">
<p>产品名称:{{hdr.sMaterialName}}</p> <p>幅宽:{{hdr.sWidth}}</p>
<p>克重:{{hdr.sGMWT}}</p> <p>克重:{{hdr.sGMWT}}</p>
</div> </div>
</div> </div>
...@@ -142,7 +150,8 @@ ...@@ -142,7 +150,8 @@
<v-layout row wrap> <v-layout row wrap>
<v-flex xs3 v-for="(item, index) in dtl_src" :key="index"> <v-flex xs3 v-for="(item, index) in dtl_src" :key="index">
<div class="img"> <div class="img">
<img :src="item" @click="selectImg('dtl',index)" /> <img :src="item" @error="error(item,index,'dtl')" v-if="!dtl[index].isErr" @click="selectImg('dtl',index)" />
<img v-else src="../../assets/imgErr.png"/>
</div> </div>
<div style="border:1px solid #ddd;border-top:0;height:20px;font-size:12px;"> <div style="border:1px solid #ddd;border-top:0;height:20px;font-size:12px;">
{{dtl[index].sColorNo}} {{dtl[index].sColorNo}}
...@@ -156,12 +165,9 @@ ...@@ -156,12 +165,9 @@
</template> </template>
<script> <script>
import imageView from 'vue-imageview' import imageView from 'vue-imageview'
import Util from '@/libs/util.js' import Util from '@/libs/util.js'
function nofind(e){
console.log(e,11)
}
export default { export default {
name: 'specimen', name: 'specimen',
data () { data () {
...@@ -179,26 +185,35 @@ export default { ...@@ -179,26 +185,35 @@ export default {
} }
}, },
async mounted(){ async mounted(){
this.iProjectId = this.$route.params.iProjectId; this.iProjectId = this.$route.params.iProjectId;
this.sMaterialNo = this.$route.params.sMaterialNo; this.$route.params.sMaterialNo.split('.').map((x,y) => {
await this.getSpeciminHdr(); this.sMaterialNo += String.fromCharCode(x)
await this.getSpeciminDtl(); })
await this.getSpeciminHdr();
await this.getSpeciminDtl();
}, },
components:{ components:{
'image-view': imageView 'image-view': imageView
}, },
methods:{ methods:{
error(item,index,type){
if(type == 'hdr'){
this.$set(this.hdr,'isErr',true)
}else{
this.$set(this.dtl[index],'isErr',true)
}
},
async getSpeciminHdr(){ async getSpeciminHdr(){
let result = await this.request('getSpeciminHdr',{ let result = await this.request('getSpeciminHdr',{
data:[ data:[
{key: "url", value: "sMaterialName"}, {key: "url", value: "sMaterialName"},
{key: "searchname", value: this.sMaterialNo} {key: "searchname", value: this.sMaterialNo}
] ]
},true,{iProject:this.iProject}); },true,{iProjectId:this.iProjectId,sUserName:'huansi'});
if(this.hdr.length <= 0) return false;
this.hdr = result[0]; this.hdr = result[0];
this.hdr.isErr = false;
this.hdr_src.push(`https://weixin.huansi.net/apiproxy/huansi/Mall/mmmaterial/image_click/?iProjectId=${this.iProjectId}&iIden=${this.hdr.iIden}&m=${Math.random() / 9999}`) this.hdr_src.push(`https://weixin.huansi.net/apiproxy/huansi/Mall/mmmaterial/image_click/?iProjectId=${this.iProjectId}&iIden=${this.hdr.iIden}&m=${Math.random() / 9999}`)
}, },
async getSpeciminDtl(){ async getSpeciminDtl(){
...@@ -207,11 +222,18 @@ export default { ...@@ -207,11 +222,18 @@ export default {
{key: "url", value: "getDetail"}, {key: "url", value: "getDetail"},
{key: "iIden", value: this.hdr.iIden} {key: "iIden", value: this.hdr.iIden}
] ]
},true,{iProject:this.iProject}); },true,{iProjectId:this.iProjectId});
result.map(x=>{ result.map(x=>{
x.tCreateTime = x.tCreateTime.replace(/-/g,'/').split('.')[0];
})
let data = result.sort((x,y)=>{
return new Date(x.tCreateTime).getTime() - new Date(y.tCreateTime).getTime();
})
data.map(x=>{
x.isErr = false;
this.dtl_src.push(`https://weixin.huansi.net/apiproxy/huansi/Mall/mmmaterial/image_click/?iProjectId=${this.iProjectId}&iIden=${x.iIden}&m=${Math.random() / 9999}`) this.dtl_src.push(`https://weixin.huansi.net/apiproxy/huansi/Mall/mmmaterial/image_click/?iProjectId=${this.iProjectId}&iIden=${x.iIden}&m=${Math.random() / 9999}`)
}) })
this.dtl = result; this.dtl = data;
}, },
showImgView (type) { showImgView (type) {
if(type == 'hdr'){ if(type == 'hdr'){
......
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