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

123

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