Commit 03158127 authored by Yulun Yao's avatar Yulun Yao 🇨🇳

123

parent 4fd07397
...@@ -101,16 +101,16 @@ const errorHandler = (err) => { ...@@ -101,16 +101,16 @@ const errorHandler = (err) => {
} }
} }
Axios.interceptors.request.use(config => { // Axios.interceptors.request.use(config => {
const token = Cookie.get('token') || Store.state.token // const token = Cookie.get('token') || Store.state.token
console.log(token) // console.log(token)
if (token) { // if (token) {
config.headers.Authorization = token // config.headers.Authorization = token
} // }
return config // return config
}, error => { // }, error => {
return Promise.reject(error) // return Promise.reject(error)
}) // })
Axios.interceptors.response.use( Axios.interceptors.response.use(
response => { response => {
......
...@@ -45,7 +45,7 @@ default: // 默认环境下(开发环境) ...@@ -45,7 +45,7 @@ default: // 默认环境下(开发环境)
// WBX_URL = 'https://wbx-uat.omniview.pro/pc' // WBX_URL = 'https://wbx-uat.omniview.pro/pc'
// BASE_URL = '/api' // BASE_URL = '/api'
// BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2' // BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2'
BASE_URL = 'https://wbx-uat.omniview.pro/api' BASE_URL = 'https://yapi.omniview.pro/mock/161'
// BASE_URL = 'http://xuhui.hm.omniview.pro/api/v2' // BASE_URL = 'http://xuhui.hm.omniview.pro/api/v2'
// BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2' // BASE_URL = 'http://yangpu-hm.omniview.pro/api/v2'
// BASE_URL = 'http://211.136.105.193/apiv2' // BASE_URL = 'http://211.136.105.193/apiv2'
...@@ -235,5 +235,9 @@ export default { ...@@ -235,5 +235,9 @@ export default {
POST_LABEL_CREATE_CONFIRM: '/service-customkey-ddd/label/confirm', POST_LABEL_CREATE_CONFIRM: '/service-customkey-ddd/label/confirm',
GET_ID_INFO_BY_LABEL: '/service-customkey-ddd/label/resource/datas', GET_ID_INFO_BY_LABEL: '/service-customkey-ddd/label/resource/datas',
GET_WY_AND_YWH_LIST: '/service-customkey-ddd/datas', GET_WY_AND_YWH_LIST: '/service-customkey-ddd/datas',
GET_RESERVATION_LIST: '/service-documents/repair/reservations' GET_RESERVATION_LIST: '/service-documents/repair/reservations',
GET_IFTTT_RULES_LIST: '/api/ifttt-center/executor/logs/query',
GET_BUSINESS_LIST: '/api/ifttt-center/business/system/query',
POST_ADD_BUSINESS_RECORD: '/api/ifttt-center/business/system'
} }
...@@ -139,21 +139,21 @@ export default { ...@@ -139,21 +139,21 @@ export default {
}, },
{ {
title: '系统编码', title: '系统编码',
dataIndex: 'xtbm', dataIndex: 'code',
align: 'center', align: 'center',
key: 'xtbm' key: 'code'
}, },
{ {
title: '系统名称', title: '系统名称',
dataIndex: 'xtmc', dataIndex: 'name',
align: 'center', align: 'center',
key: 'xtmc' key: 'name'
}, },
{ {
title: '系统地址', title: '系统地址',
dataIndex: 'xtdz', dataIndex: 'url',
align: 'center', align: 'center',
key: 'xtdz' key: 'url'
}, },
{ {
title: '操作', title: '操作',
...@@ -177,7 +177,17 @@ export default { ...@@ -177,7 +177,17 @@ export default {
formStoreList: [] formStoreList: []
} }
}, },
mounted() {
this.getList()
},
methods: { methods: {
getList() {
this.$ajax.post({
url: this.$api.GET_BUSINESS_LIST
}).then(res => {
this.list = this.$com.confirm(res, 'data.content', [])
})
},
pageChange(val) { pageChange(val) {
this.pagination.pageNo = val this.pagination.pageNo = val
this.pagination.current = val this.pagination.current = val
...@@ -200,13 +210,18 @@ export default { ...@@ -200,13 +210,18 @@ export default {
this.current += 1 this.current += 1
}, },
handleRegisterOk() { handleRegisterOk() {
this.form.validateFields((err, values) => { let addForm = {}
if (!err) { // this.form.validateFields((err, values) => {
console.log(this.form.getFieldsValue()) // if (!err) {
} else { addForm.code = this.form.getFieldValue('xtbm')
this.$message.info('请填写表单所有项目!') addForm.name = this.form.getFieldValue('xtmc')
} addForm.url = this.form.getFieldValue('xtdz')
})
console.log(addForm)
// } else {
// this.$message.info('请填写表单所有项目!')
// }
// })
} }
} }
} }
......
...@@ -20,6 +20,21 @@ ...@@ -20,6 +20,21 @@
<span slot="no" slot-scope="text, record, index"> <span slot="no" slot-scope="text, record, index">
{{index+1}} {{index+1}}
</span> </span>
<span slot="cffw" slot-scope="text, record, index">
{{record.rule.trigger.name}}
</span>
<span slot="zxfw" slot-scope="text, record, index">
{{record.rule.action.name}}
</span>
<span slot="time" slot-scope="text, record, index">
{{$moment(record.time).format('YYYY-MM-DD HH:MM')}}
</span>
<p slot="expandedRowRender" slot-scope="record" style="margin: 0; text-align: left">
<a-row>规则:{{record.rule.rules}}</a-row>
<a-row>日志:{{record.log}}</a-row>
</p>
</a-table> </a-table>
</div> </div>
</div> </div>
...@@ -46,19 +61,28 @@ export default { ...@@ -46,19 +61,28 @@ export default {
title: '触发服务', title: '触发服务',
dataIndex: 'cffw', dataIndex: 'cffw',
align: 'center', align: 'center',
key: 'cffw' key: 'cffw',
scopedSlots: {
customRender: 'cffw',
},
}, },
{ {
title: '执行服务', title: '执行服务',
dataIndex: 'zxfw', dataIndex: 'zxfw',
align: 'center', align: 'center',
key: 'zxfw' key: 'zxfw',
scopedSlots: {
customRender: 'zxfw',
},
}, },
{ {
title: '执行时间', title: '执行时间',
dataIndex: 'zxsj', dataIndex: 'time',
align: 'center', align: 'center',
key: 'zxsj' key: 'time',
scopedSlots: {
customRender: 'time',
},
}, },
{ {
title: '执行结果', title: '执行结果',
...@@ -78,7 +102,17 @@ export default { ...@@ -78,7 +102,17 @@ export default {
}, },
} }
}, },
mounted() {
this.getList()
},
methods: { methods: {
getList() {
this.$ajax.post({
url: this.$api.GET_IFTTT_RULES_LIST
}).then(res => {
this.list = this.$com.confirm(res, 'data.content', [])
})
},
pageChange(val) { pageChange(val) {
this.pagination.pageNo = val this.pagination.pageNo = val
this.pagination.current = val this.pagination.current = val
......
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