接口
This commit is contained in:
@@ -65,7 +65,7 @@
|
||||
|
||||
<script>
|
||||
import SaveChain from './save-chain.vue'
|
||||
import { queryStation, queryTaskChain, sendTask, saveTask, cancelTask, deleteTaskChain, updateStation } from '@config/getData.js'
|
||||
import { queryStation, queryTaskChain, queryTaskChainDtl, sendTask, saveTask, cancelTask, deleteTaskChain, updateStation } from '@config/getData.js'
|
||||
export default {
|
||||
components: {
|
||||
SaveChain
|
||||
@@ -194,13 +194,24 @@ export default {
|
||||
},
|
||||
// 点击任务链点位
|
||||
handleLinkCheck (e) {
|
||||
const code = e.chain_point.split('-')
|
||||
const cname = e.chain_name.split('-')
|
||||
const type = e.action_type.split('-')
|
||||
code.map((e, i) => {
|
||||
this.newData.push({station_code: e, station_name: cname[i], action_type: type[i]})
|
||||
})
|
||||
this.chainId = e.chain_id
|
||||
this._queryTaskChainDtl(e.chain_id)
|
||||
},
|
||||
// 任务链明细
|
||||
async _queryTaskChainDtl (id) {
|
||||
try {
|
||||
let res = await queryTaskChainDtl(id)
|
||||
if (res && res.data) {
|
||||
this.newData = [...res.data]
|
||||
this.chainId = id
|
||||
} else {
|
||||
this.newData = []
|
||||
this.chainId = ''
|
||||
}
|
||||
} catch (e) {
|
||||
this.$message.error(e)
|
||||
this.newData = []
|
||||
this.chainId = ''
|
||||
}
|
||||
},
|
||||
// 发送任务
|
||||
async _sendTask () {
|
||||
|
||||
Reference in New Issue
Block a user