|
@@ -123,7 +123,9 @@
|
|
@custom-event="dialogEvents.editSpiderConfigSaveEvent"
|
|
@custom-event="dialogEvents.editSpiderConfigSaveEvent"
|
|
@data-tag="editDialogMarkClick($event)"
|
|
@data-tag="editDialogMarkClick($event)"
|
|
/>
|
|
/>
|
|
- <RunSpiderDialog ref="runSpiderDialog" />
|
|
|
|
|
|
+ <RunSpiderDialog ref="runSpiderDialog"
|
|
|
|
+ @save="dialogEvents.runSpiderConfigSave"
|
|
|
|
+ />
|
|
<VerifySpider ref="verifySpiderDialog" />
|
|
<VerifySpider ref="verifySpiderDialog" />
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -491,6 +493,20 @@ const dialogEvents = {
|
|
const rowData = data._originData
|
|
const rowData = data._originData
|
|
const payload = data.value
|
|
const payload = data.value
|
|
const code = rowData.code
|
|
const code = rowData.code
|
|
|
|
+ // 保存逻辑
|
|
|
|
+ console.log(data, payload, code)
|
|
|
|
+ dialogEvents.saveRequest(code, payload)
|
|
|
|
+ },
|
|
|
|
+ runSpiderConfigSave(data) {
|
|
|
|
+ console.log(data)
|
|
|
|
+ const rowData = data._originData
|
|
|
|
+ const payload = data.value
|
|
|
|
+ const code = rowData.code
|
|
|
|
+ // 保存逻辑
|
|
|
|
+ console.log(data, payload, code)
|
|
|
|
+ dialogEvents.saveRequest(code, payload)
|
|
|
|
+ },
|
|
|
|
+ async saveRequest(code, payload) {
|
|
const updateRule = [
|
|
const updateRule = [
|
|
{
|
|
{
|
|
query: { code: code },
|
|
query: { code: code },
|
|
@@ -503,7 +519,6 @@ const dialogEvents = {
|
|
stype: 'save',
|
|
stype: 'save',
|
|
update: updateRule
|
|
update: updateRule
|
|
}
|
|
}
|
|
- console.log("change data:", data, params)
|
|
|
|
try {
|
|
try {
|
|
const r = await store.dispatch('rulesList/editCodeItem', params)
|
|
const r = await store.dispatch('rulesList/editCodeItem', params)
|
|
const { msg, err } = r
|
|
const { msg, err } = r
|
|
@@ -529,7 +544,7 @@ const dialogEvents = {
|
|
duration: 3000,
|
|
duration: 3000,
|
|
})
|
|
})
|
|
}
|
|
}
|
|
- },
|
|
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
const getMarkWithRow = row => {
|
|
const getMarkWithRow = row => {
|
|
@@ -632,6 +647,19 @@ const tableEvents = {
|
|
},
|
|
},
|
|
handleSubmit(index, row) {
|
|
handleSubmit(index, row) {
|
|
onlyClickHighlight(row, '_action_clicked_submit')
|
|
onlyClickHighlight(row, '_action_clicked_submit')
|
|
|
|
+ ElMessageBox.confirm('确定提交?', '提示',
|
|
|
|
+ {
|
|
|
|
+ customClass: 'j-confirm-message-box',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ showCancelButton: false,
|
|
|
|
+ }
|
|
|
|
+ ).then(() => {
|
|
|
|
+ this.confirmSubmit(row)
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ confirmSubmit(row) {
|
|
const lua = getLuaParams(row)
|
|
const lua = getLuaParams(row)
|
|
lua.state = 1
|
|
lua.state = 1
|
|
ServerActionUpdateCodeState({ lua: lua }).then(r => {
|
|
ServerActionUpdateCodeState({ lua: lua }).then(r => {
|