This commit is contained in:
2025-07-16 10:49:07 +08:00
parent ed1f7cf063
commit ecc4e40939
4 changed files with 107 additions and 64 deletions

View File

@@ -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 () {