Commit 9167627f authored by 黄奎's avatar 黄奎

页面修改

parent c492cd12
......@@ -13,7 +13,7 @@
<q-td key="TCNUM" :props="props">{{ props.row.TCNUM }}</q-td>
<q-td key="Title" :props="props">
<div style="max-width:435px;white-space: pre-wrap;">
<a @click="OpenNewUrl(props.row.LinkUrl)" target="_blank">{{ props.row.Title }}</a>
<a @click="getUrl(props.row.LinkUrl)" target="_blank">{{ props.row.Title }}</a>
</div>
</q-td>
<q-td key="DayNum" :props="props">{{ props.row.DayNum }}</q-td>
......@@ -30,9 +30,9 @@
:class="{'text-orange':props.row.Seat>0,'text-pink':(props.row.Seat==0 && props.row.Substitute),'text-red':(props.row.Seat==0 && !props.row.Substitute)}">{{ props.row.Seat>0?'有名額':(props.row.Seat==0 && props.row.Substitute?'可候補':'名額已滿') }}</span>
</q-td>
<q-td key="TCID" :props="props">
<q-btn type="a" @click="(props.row.Seat>0||props.row.Substitute)?OpenNewUrl(props.row.LinkUrl):''" target="_blank"
:label="props.row.Seat>0||props.row.Substitute?'我有興趣':'無法預訂'"
<q-btn type="a" @click="(props.row.Seat>0||props.row.Substitute)?getUrl(props.row.LinkUrl):''"
target="_blank" :label="props.row.Seat>0||props.row.Substitute?'我有興趣':'無法預訂'"
:color="props.row.Seat>0||props.row.Substitute?'indigo':'grey'" rounded unelevated
:disable="props.row.Seat==0&&props.row.Substitute" />
</q-td>
......@@ -62,7 +62,7 @@
<q-item-section>
<q-item-label class="text-grey">團體名稱</q-item-label>
<q-item-label lines="2">
<a @click="OpenNewUrl(props.row.LinkUrl)" target="_blank">{{ props.row.Title }}</a>
<a @click="getUrl(props.row.LinkUrl)" target="_blank">{{ props.row.Title }}</a>
</q-item-label>
</q-item-section>
</q-item>
......@@ -102,8 +102,8 @@
</q-item>
<q-item>
<q-item-section>
<q-btn type="a" @click="OpenNewUrl(props.row.LinkUrl)" target="_blank"
<q-btn type="a" @click="getUrl(props.row.LinkUrl)" target="_blank"
:label="props.row.Seat>0||props.row.Substitute?'我有興趣':'無法預訂'"
:color="props.row.Seat>0||props.row.Substitute?'indigo':'grey'" rounded unelevated
:disable="props.row.Seat==0&&props.row.Substitute" />
......@@ -192,6 +192,21 @@
methods: {
formatLabel(firstRowIndex, endRowIndex, totalRowsNumber) {
return "";
},
getUrl(url) {
var resultUrl = "";
var currenthref = location.href;
var newUrl = url.substring(url.indexOf('/details'));
if (currenthref.indexOf("#") > -1) {
resultUrl = currenthref.substring(0, currenthref.indexOf('/#/'))+"/#" + newUrl;
} else {
resultUrl = location.hostname;
if (location.port != 80) {
resultUrl += ":" + location.port;
}
resultUrl += newUrl
}
this.OpenNewUrl(resultUrl);
}
},
};
......
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