气象预警
parent
6121834f85
commit
e4a178d878
|
@ -57,3 +57,16 @@ export function getBirthday(data) {
|
||||||
data:data
|
data:data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getPostcode(code) {
|
||||||
|
return request({
|
||||||
|
url: '/port/list/getPostcode?code='+code,
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
export function getWeather() {
|
||||||
|
return request({
|
||||||
|
url: '/port/list/getWeather',
|
||||||
|
method: 'GET'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -17,9 +17,9 @@
|
||||||
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testPhone()" v-if="connector.connectorName=='手机号查询归属地'">测试API</el-button>
|
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testPhone()" v-if="connector.connectorName=='手机号查询归属地'">测试API</el-button>
|
||||||
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testIP()" v-if="connector.connectorName=='IP查询归属地'">测试API</el-button>
|
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testIP()" v-if="connector.connectorName=='IP查询归属地'">测试API</el-button>
|
||||||
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testNews()" v-if="connector.connectorName=='新闻头条'">测试API</el-button>
|
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testNews()" v-if="connector.connectorName=='新闻头条'">测试API</el-button>
|
||||||
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testWeather()" v-if="connector.connectorName=='气象预警'">测试</el-button>
|
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testWeather()" v-if="connector.connectorName=='气象预警'">测试API</el-button>
|
||||||
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testBirthdate()" v-if="connector.connectorName=='生辰助手'">测试API</el-button>
|
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testBirthdate()" v-if="connector.connectorName=='生辰助手'">测试API</el-button>
|
||||||
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testMailbox()" v-if="connector.connectorName=='邮编查询'">测试</el-button>
|
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testMailbox()" v-if="connector.connectorName=='邮编查询'">测试API</el-button>
|
||||||
</el-card>
|
</el-card>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -88,31 +88,58 @@
|
||||||
<el-input v-model="formBirthday.hour" autocomplete="off" placeholder="请输入几点"></el-input>
|
<el-input v-model="formBirthday.hour" autocomplete="off" placeholder="请输入几点"></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<span style="font-weight: bold;font-size: 20px" v-if="formBirthday.reason==true">
|
<span style="font-weight: bold;font-size: 20px" v-if="formBirthday.reason==true">
|
||||||
{{this.formBirthday.years}}<br>
|
years: {{this.formBirthday.years}}<br>
|
||||||
{{this.formBirthday.months}}<br>
|
months: {{this.formBirthday.months}}<br>
|
||||||
{{this.formBirthday.days}}<br>
|
days: {{this.formBirthday.days}}<br>
|
||||||
{{this.formBirthday.animal}}<br>
|
animal: {{this.formBirthday.animal}}<br>
|
||||||
{{this.formBirthday.imonthcn}}<br>
|
imonthcn: {{this.formBirthday.imonthcn}}<br>
|
||||||
{{this.formBirthday.idaycn}}<br>
|
idaycn: {{this.formBirthday.idaycn}}<br>
|
||||||
{{this.formBirthday.cyear}}<br>
|
cyear: {{this.formBirthday.cyear}}<br>
|
||||||
{{this.formBirthday.cmonth}}<br>
|
cmonth: {{this.formBirthday.cmonth}}<br>
|
||||||
{{this.formBirthday.cday}}<br>
|
cday: {{this.formBirthday.cday}}<br>
|
||||||
{{this.formBirthday.gzyear}}<br>
|
gzyear: {{this.formBirthday.gzyear}}<br>
|
||||||
{{this.formBirthday.gzmonth}}<br>
|
gzmonth: {{this.formBirthday.gzmonth}}<br>
|
||||||
{{this.formBirthday.gzday}}<br>
|
gzday: {{this.formBirthday.gzday}}<br>
|
||||||
{{this.formBirthday.isleap}}<br>
|
isleap: {{this.formBirthday.isleap}}<br>
|
||||||
{{this.formBirthday.ncweek}}<br>
|
ncweek: {{this.formBirthday.ncweek}}<br>
|
||||||
{{this.formBirthday.isterm}}<br>
|
isterm: {{this.formBirthday.isterm}}<br>
|
||||||
{{this.formBirthday.term}}<br>
|
term: {{this.formBirthday.term}}<br>
|
||||||
{{this.formBirthday.astro}}<br>
|
astro: {{this.formBirthday.astro}}<br>
|
||||||
{{this.formBirthday.eightall}}<br>
|
eightall: {{this.formBirthday.eightall}}<br>
|
||||||
{{this.formBirthday.fiveall}}
|
fiveall: {{this.formBirthday.fiveall}}
|
||||||
</span>
|
</span>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="getBirthday()">发起请求</el-button>
|
<el-button type="primary" @click="getBirthday()">发起请求</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
<!--邮编查询-->
|
||||||
|
<el-dialog title="邮编查询" :visible.sync="dialogFormVisible3">
|
||||||
|
<el-form :model="formPostCode">
|
||||||
|
<el-form-item label="邮编" >
|
||||||
|
<el-input v-model="formPostCode.code" autocomplete="off" placeholder="请输入邮编"></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<el-table :data="gridData2" v-if="formPostCode.reason==true">
|
||||||
|
<el-table-column property="postNumber" label="邮编" width="150"></el-table-column>
|
||||||
|
<el-table-column property="province" label="省" width="200"></el-table-column>
|
||||||
|
<el-table-column property="city" label="市"></el-table-column>
|
||||||
|
<el-table-column property="district" label="区"></el-table-column>
|
||||||
|
<el-table-column property="address" label="县"></el-table-column>
|
||||||
|
</el-table>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="getPostcode()">发起请求</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
|
<!-- 气象预警-->
|
||||||
|
<el-dialog title="气象预警" :visible.sync="dialogFormVisible4">
|
||||||
|
<el-aside width="100%">
|
||||||
|
<el-tree :data="data" :props="defaultProps"></el-tree>
|
||||||
|
</el-aside>
|
||||||
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -125,6 +152,8 @@ import {phonePlace} from "@/api/port/port";
|
||||||
import {getIpPlace} from "@/api/port/port";
|
import {getIpPlace} from "@/api/port/port";
|
||||||
import {getHeadlines} from "@/api/port/port";
|
import {getHeadlines} from "@/api/port/port";
|
||||||
import {getBirthday} from "@/api/port/port";
|
import {getBirthday} from "@/api/port/port";
|
||||||
|
import {getPostcode} from "@/api/port/port";
|
||||||
|
import {getWeather} from "@/api/port/port";
|
||||||
export default {
|
export default {
|
||||||
//import引入的组件需要注入到对象中才能使用"
|
//import引入的组件需要注入到对象中才能使用"
|
||||||
components: {},
|
components: {},
|
||||||
|
@ -133,9 +162,26 @@ export default {
|
||||||
//这里存放数据"
|
//这里存放数据"
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
formWeather:{},
|
||||||
|
data:[],
|
||||||
|
defaultProps: {
|
||||||
|
children:"citys",
|
||||||
|
label:'provinceName',
|
||||||
|
},
|
||||||
connectorList:[],
|
connectorList:[],
|
||||||
gridData:[],
|
gridData:[],
|
||||||
|
gridData2:[],
|
||||||
form:{},
|
form:{},
|
||||||
|
// 邮编查询
|
||||||
|
formPostCode:{
|
||||||
|
code:"",
|
||||||
|
// postNumber:"",
|
||||||
|
// province:"",
|
||||||
|
// city:"",
|
||||||
|
// district:"",
|
||||||
|
// address:"",
|
||||||
|
reason:"",
|
||||||
|
},
|
||||||
// 手机号查询归属地formInline
|
// 手机号查询归属地formInline
|
||||||
formInline:{
|
formInline:{
|
||||||
tel:"",
|
tel:"",
|
||||||
|
@ -189,6 +235,8 @@ export default {
|
||||||
dialogFormVisible:false,
|
dialogFormVisible:false,
|
||||||
dialogFormVisible1:false,
|
dialogFormVisible1:false,
|
||||||
dialogFormVisible2:false,
|
dialogFormVisible2:false,
|
||||||
|
dialogFormVisible3:false,
|
||||||
|
dialogFormVisible4:false,
|
||||||
dialogTableVisible:false,
|
dialogTableVisible:false,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
@ -205,6 +253,26 @@ export default {
|
||||||
watch: {},
|
watch: {},
|
||||||
//方法集合",
|
//方法集合",
|
||||||
methods: {
|
methods: {
|
||||||
|
// 气象预警
|
||||||
|
testWeather(){
|
||||||
|
|
||||||
|
getWeather().then((res)=>{
|
||||||
|
this.data=res.data;
|
||||||
|
|
||||||
|
this.dialogFormVisible4=true;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
// 邮编查询
|
||||||
|
getPostcode(){
|
||||||
|
getPostcode(this.formPostCode.code).then((res)=>{
|
||||||
|
console.log(res.data);
|
||||||
|
this.gridData2=res.data;
|
||||||
|
this.formPostCode.reason=true;
|
||||||
|
})
|
||||||
|
},
|
||||||
|
testMailbox(){
|
||||||
|
this.dialogFormVisible3=true;
|
||||||
|
},
|
||||||
getBirthday(){
|
getBirthday(){
|
||||||
getBirthday(this.formBirthday).then((res)=>{
|
getBirthday(this.formBirthday).then((res)=>{
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
|
@ -226,8 +294,8 @@ export default {
|
||||||
this.formBirthday.isterm=res.data.isterm;
|
this.formBirthday.isterm=res.data.isterm;
|
||||||
this.formBirthday.term=res.data.term;
|
this.formBirthday.term=res.data.term;
|
||||||
this.formBirthday.astro=res.data.astro;
|
this.formBirthday.astro=res.data.astro;
|
||||||
// this.formBirthday.eightall=res.data.eightall;
|
this.formBirthday.eightall=res.data.eightall;
|
||||||
// this.formBirthday.fiveall=res.data.fiveall;
|
this.formBirthday.fiveall=res.data.fiveall;
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue