气象预警
parent
6121834f85
commit
e4a178d878
|
@ -57,3 +57,16 @@ export function getBirthday(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="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="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="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-col>
|
||||
</el-row>
|
||||
|
@ -88,31 +88,58 @@
|
|||
<el-input v-model="formBirthday.hour" autocomplete="off" placeholder="请输入几点"></el-input>
|
||||
</el-form-item>
|
||||
<span style="font-weight: bold;font-size: 20px" v-if="formBirthday.reason==true">
|
||||
{{this.formBirthday.years}}<br>
|
||||
{{this.formBirthday.months}}<br>
|
||||
{{this.formBirthday.days}}<br>
|
||||
{{this.formBirthday.animal}}<br>
|
||||
{{this.formBirthday.imonthcn}}<br>
|
||||
{{this.formBirthday.idaycn}}<br>
|
||||
{{this.formBirthday.cyear}}<br>
|
||||
{{this.formBirthday.cmonth}}<br>
|
||||
{{this.formBirthday.cday}}<br>
|
||||
{{this.formBirthday.gzyear}}<br>
|
||||
{{this.formBirthday.gzmonth}}<br>
|
||||
{{this.formBirthday.gzday}}<br>
|
||||
{{this.formBirthday.isleap}}<br>
|
||||
{{this.formBirthday.ncweek}}<br>
|
||||
{{this.formBirthday.isterm}}<br>
|
||||
{{this.formBirthday.term}}<br>
|
||||
{{this.formBirthday.astro}}<br>
|
||||
{{this.formBirthday.eightall}}<br>
|
||||
{{this.formBirthday.fiveall}}
|
||||
years: {{this.formBirthday.years}}<br>
|
||||
months: {{this.formBirthday.months}}<br>
|
||||
days: {{this.formBirthday.days}}<br>
|
||||
animal: {{this.formBirthday.animal}}<br>
|
||||
imonthcn: {{this.formBirthday.imonthcn}}<br>
|
||||
idaycn: {{this.formBirthday.idaycn}}<br>
|
||||
cyear: {{this.formBirthday.cyear}}<br>
|
||||
cmonth: {{this.formBirthday.cmonth}}<br>
|
||||
cday: {{this.formBirthday.cday}}<br>
|
||||
gzyear: {{this.formBirthday.gzyear}}<br>
|
||||
gzmonth: {{this.formBirthday.gzmonth}}<br>
|
||||
gzday: {{this.formBirthday.gzday}}<br>
|
||||
isleap: {{this.formBirthday.isleap}}<br>
|
||||
ncweek: {{this.formBirthday.ncweek}}<br>
|
||||
isterm: {{this.formBirthday.isterm}}<br>
|
||||
term: {{this.formBirthday.term}}<br>
|
||||
astro: {{this.formBirthday.astro}}<br>
|
||||
eightall: {{this.formBirthday.eightall}}<br>
|
||||
fiveall: {{this.formBirthday.fiveall}}
|
||||
</span>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="getBirthday()">发起请求</el-button>
|
||||
</div>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
|
@ -125,6 +152,8 @@ import {phonePlace} from "@/api/port/port";
|
|||
import {getIpPlace} from "@/api/port/port";
|
||||
import {getHeadlines} from "@/api/port/port";
|
||||
import {getBirthday} from "@/api/port/port";
|
||||
import {getPostcode} from "@/api/port/port";
|
||||
import {getWeather} from "@/api/port/port";
|
||||
export default {
|
||||
//import引入的组件需要注入到对象中才能使用"
|
||||
components: {},
|
||||
|
@ -133,9 +162,26 @@ export default {
|
|||
//这里存放数据"
|
||||
|
||||
return {
|
||||
formWeather:{},
|
||||
data:[],
|
||||
defaultProps: {
|
||||
children:"citys",
|
||||
label:'provinceName',
|
||||
},
|
||||
connectorList:[],
|
||||
gridData:[],
|
||||
gridData2:[],
|
||||
form:{},
|
||||
// 邮编查询
|
||||
formPostCode:{
|
||||
code:"",
|
||||
// postNumber:"",
|
||||
// province:"",
|
||||
// city:"",
|
||||
// district:"",
|
||||
// address:"",
|
||||
reason:"",
|
||||
},
|
||||
// 手机号查询归属地formInline
|
||||
formInline:{
|
||||
tel:"",
|
||||
|
@ -189,6 +235,8 @@ export default {
|
|||
dialogFormVisible:false,
|
||||
dialogFormVisible1:false,
|
||||
dialogFormVisible2:false,
|
||||
dialogFormVisible3:false,
|
||||
dialogFormVisible4:false,
|
||||
dialogTableVisible:false,
|
||||
};
|
||||
},
|
||||
|
@ -205,6 +253,26 @@ export default {
|
|||
watch: {},
|
||||
//方法集合",
|
||||
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(this.formBirthday).then((res)=>{
|
||||
console.log(res.data);
|
||||
|
@ -226,8 +294,8 @@ export default {
|
|||
this.formBirthday.isterm=res.data.isterm;
|
||||
this.formBirthday.term=res.data.term;
|
||||
this.formBirthday.astro=res.data.astro;
|
||||
// this.formBirthday.eightall=res.data.eightall;
|
||||
// this.formBirthday.fiveall=res.data.fiveall;
|
||||
this.formBirthday.eightall=res.data.eightall;
|
||||
this.formBirthday.fiveall=res.data.fiveall;
|
||||
|
||||
})
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue